In let params all parameters for fetching data will merge recursively using lodash merge. The issue is when you have an object that has a key with a value of undefined, that undefined will not merge.
When dynamically overriding the searchInfo with opt?.searchInfo, the searchInfo object's key with a defined value and opt?.searchInfo with a key value is undefined, resulting in unexpected behavior. This scenario is utilized in business logic where occasionally setting the searchInfo key to undefined is necessary to meet requirements.
⚠️ IMPORTANT ⚠️ Please check the following list before proceeding. If you ignore this issue template, your issue will be directly closed.
Describe the bug
In
let params
all parameters for fetching data will merge recursively using lodash merge. The issue is when you have an object that has a key with a value of undefined, that undefined will not merge.When dynamically overriding the
searchInfo
withopt?.searchInfo
, thesearchInfo
object's key with a defined value andopt?.searchInfo
with a key value is undefined, resulting in unexpected behavior. This scenario is utilized in business logic where occasionally setting thesearchInfo
key to undefined is necessary to meet requirements.Reference
https://github.com/vbenjs/vue-vben-admin/commit/59b309aa7e0049f0ade0b5ee932f146c5bdb8dfc
Reproduction and Expected Output
System Info