@whitesev/utils 1.5.9 → 1.6.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.amd.js +10 -2
- package/dist/index.amd.js.map +1 -1
- package/dist/index.cjs.js +10 -2
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +10 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/index.iife.js +10 -2
- package/dist/index.iife.js.map +1 -1
- package/dist/index.system.js +10 -2
- package/dist/index.system.js.map +1 -1
- package/dist/index.umd.js +10 -2
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/Utils.ts +9 -1
package/dist/index.system.js
CHANGED
|
@@ -3466,13 +3466,20 @@ System.register('Utils', [], (function (exports) {
|
|
|
3466
3466
|
return source;
|
|
3467
3467
|
}
|
|
3468
3468
|
}
|
|
3469
|
+
if (source == null) {
|
|
3470
|
+
return target;
|
|
3471
|
+
}
|
|
3472
|
+
if (target == null) {
|
|
3473
|
+
target = {};
|
|
3474
|
+
}
|
|
3469
3475
|
if (isAdd) {
|
|
3470
3476
|
for (const sourceKeyName in source) {
|
|
3471
3477
|
const targetKeyName = sourceKeyName;
|
|
3472
3478
|
let targetValue = target[targetKeyName];
|
|
3473
3479
|
let sourceValue = source[sourceKeyName];
|
|
3474
|
-
if (
|
|
3475
|
-
|
|
3480
|
+
if (typeof sourceValue === "object" &&
|
|
3481
|
+
sourceValue != null &&
|
|
3482
|
+
sourceKeyName in target &&
|
|
3476
3483
|
!UtilsContext.isDOM(sourceValue)) {
|
|
3477
3484
|
/* 源端的值是object类型,且不是元素节点 */
|
|
3478
3485
|
target[sourceKeyName] = UtilsContext.assign(targetValue, sourceValue, isAdd);
|
|
@@ -3487,6 +3494,7 @@ System.register('Utils', [], (function (exports) {
|
|
|
3487
3494
|
let targetValue = target[targetKeyName];
|
|
3488
3495
|
let sourceValue = source[targetKeyName];
|
|
3489
3496
|
if (typeof sourceValue === "object" &&
|
|
3497
|
+
sourceValue != null &&
|
|
3490
3498
|
!UtilsContext.isDOM(sourceValue) &&
|
|
3491
3499
|
Object.keys(sourceValue).length) {
|
|
3492
3500
|
/* 源端的值是object类型,且不是元素节点 */
|