@epie/bi-crud 2.0.47 → 2.0.48

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8058,6 +8058,12 @@ function replaceParamsByDict(params, dict) {
8058
8058
  ...search,
8059
8059
  ...sort
8060
8060
  };
8061
+ // 清理 null/undefined,避免 GET 序列化成字符串 "null"/"undefined"
8062
+ for (const k in a) {
8063
+ if (a[k] === null || a[k] === undefined) {
8064
+ delete a[k];
8065
+ }
8066
+ }
8061
8067
  for (const i in b) {
8062
8068
  if (b[i] === undefined || b[i] === null) continue;
8063
8069
  if (!Object.prototype.hasOwnProperty.call(a, i)) continue;
@@ -8072,6 +8078,12 @@ function replaceParamsByDict(params, dict) {
8072
8078
  delete a[i];
8073
8079
  }
8074
8080
  }
8081
+ // 再清理一次,覆盖映射后的键
8082
+ for (const k in a) {
8083
+ if (a[k] === null || a[k] === undefined) {
8084
+ delete a[k];
8085
+ }
8086
+ }
8075
8087
  return a;
8076
8088
  }
8077
8089
 
@@ -8061,6 +8061,12 @@
8061
8061
  ...search,
8062
8062
  ...sort
8063
8063
  };
8064
+ // 清理 null/undefined,避免 GET 序列化成字符串 "null"/"undefined"
8065
+ for (const k in a) {
8066
+ if (a[k] === null || a[k] === undefined) {
8067
+ delete a[k];
8068
+ }
8069
+ }
8064
8070
  for (const i in b) {
8065
8071
  if (b[i] === undefined || b[i] === null) continue;
8066
8072
  if (!Object.prototype.hasOwnProperty.call(a, i)) continue;
@@ -8075,6 +8081,12 @@
8075
8081
  delete a[i];
8076
8082
  }
8077
8083
  }
8084
+ // 再清理一次,覆盖映射后的键
8085
+ for (const k in a) {
8086
+ if (a[k] === null || a[k] === undefined) {
8087
+ delete a[k];
8088
+ }
8089
+ }
8078
8090
  return a;
8079
8091
  }
8080
8092
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@epie/bi-crud",
3
3
  "simpleName": "bi-crud",
4
- "version": "2.0.47",
4
+ "version": "2.0.48",
5
5
  "private": false,
6
6
  "main": "lib/bi-crud.umd.js",
7
7
  "module": "lib/bi-crud.esm.js",