@whitesev/pops 1.1.0 → 1.2.0

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.
package/dist/index.umd.js CHANGED
@@ -1495,6 +1495,12 @@
1495
1495
  }
1496
1496
  assign(target = {}, source = {}, isAdd = false) {
1497
1497
  let UtilsContext = this;
1498
+ if (source == null) {
1499
+ return target;
1500
+ }
1501
+ if (target == null) {
1502
+ target = {};
1503
+ }
1498
1504
  if (Array.isArray(source)) {
1499
1505
  let canTraverse = source.filter((item) => {
1500
1506
  return typeof item === "object";
@@ -1508,8 +1514,9 @@
1508
1514
  const targetKeyName = sourceKeyName;
1509
1515
  let targetValue = target[targetKeyName];
1510
1516
  let sourceValue = source[sourceKeyName];
1511
- if (sourceKeyName in target &&
1512
- typeof sourceValue === "object" &&
1517
+ if (typeof sourceValue === "object" &&
1518
+ sourceValue != null &&
1519
+ sourceKeyName in target &&
1513
1520
  !UtilsContext.isDOM(sourceValue)) {
1514
1521
  /* 源端的值是object类型,且不是元素节点 */
1515
1522
  target[sourceKeyName] = UtilsContext.assign(targetValue, sourceValue, isAdd);
@@ -1524,6 +1531,7 @@
1524
1531
  let targetValue = target[targetKeyName];
1525
1532
  let sourceValue = source[targetKeyName];
1526
1533
  if (typeof sourceValue === "object" &&
1534
+ sourceValue != null &&
1527
1535
  !UtilsContext.isDOM(sourceValue) &&
1528
1536
  Object.keys(sourceValue).length) {
1529
1537
  /* 源端的值是object类型,且不是元素节点 */
@@ -9921,7 +9929,7 @@
9921
9929
  /** 配置 */
9922
9930
  config = {
9923
9931
  /** 版本号 */
9924
- version: "2024.7.8",
9932
+ version: "2024.7.14",
9925
9933
  cssText: {
9926
9934
  /** 主CSS */
9927
9935
  index: indexCSS,