@domql/utils
Advanced tools
Comparing version 2.5.151 to 2.5.152
@@ -9,6 +9,4 @@ 'use strict' | ||
isObject, | ||
isObjectLike, | ||
isString, | ||
joinArrays, | ||
overwriteDeep | ||
joinArrays | ||
} from '.' | ||
@@ -113,16 +111,20 @@ const ENV = process.env.NODE_ENV | ||
const newChild = element.props[childKey] | ||
const assignChild = (val) => { | ||
element[childKey] = val | ||
delete element.props[childKey] | ||
} | ||
if (newChild?.ignoreExtend) continue | ||
if (!childElem) element[childKey] = deepCloneWithExtend(newChild) | ||
if (newChild === null && childElem) { | ||
console.log('is null', element) | ||
assignChild(null) | ||
} else if (!childElem) assignChild(deepCloneWithExtend(newChild)) | ||
else { | ||
const isSugar = checkIfSugar(childElem, parent, key) | ||
if (!isSugar) continue | ||
const inheritedChildElem = element[childKey].props | ||
if (isObjectLike(newChild)) { | ||
overwriteDeep(inheritedChildElem, newChild) | ||
} else if (isFunction(newChild)) { | ||
element[childKey] = { | ||
extend: element[childKey], | ||
props: newChild | ||
} | ||
} | ||
const isSugarChildElem = checkIfSugar(childElem, parent, key) | ||
if (isSugarChildElem) continue | ||
assignChild({ | ||
extend: element[childKey], | ||
props: newChild | ||
}) | ||
} | ||
@@ -129,0 +131,0 @@ } |
@@ -124,19 +124,21 @@ "use strict"; | ||
const newChild = element.props[childKey]; | ||
const assignChild = (val) => { | ||
element[childKey] = val; | ||
delete element.props[childKey]; | ||
}; | ||
if (newChild == null ? void 0 : newChild.ignoreExtend) | ||
continue; | ||
if (!childElem) | ||
element[childKey] = (0, import__.deepCloneWithExtend)(newChild); | ||
if (newChild === null && childElem) { | ||
console.log("is null", element); | ||
assignChild(null); | ||
} else if (!childElem) | ||
assignChild((0, import__.deepCloneWithExtend)(newChild)); | ||
else { | ||
const isSugar = checkIfSugar(childElem, parent, key); | ||
if (!isSugar) | ||
const isSugarChildElem = checkIfSugar(childElem, parent, key); | ||
if (isSugarChildElem) | ||
continue; | ||
const inheritedChildElem = element[childKey].props; | ||
if ((0, import__.isObjectLike)(newChild)) { | ||
(0, import__.overwriteDeep)(inheritedChildElem, newChild); | ||
} else if ((0, import__.isFunction)(newChild)) { | ||
element[childKey] = { | ||
extend: element[childKey], | ||
props: newChild | ||
}; | ||
} | ||
assignChild({ | ||
extend: element[childKey], | ||
props: newChild | ||
}); | ||
} | ||
@@ -143,0 +145,0 @@ } |
{ | ||
"name": "@domql/utils", | ||
"version": "2.5.151", | ||
"version": "2.5.152", | ||
"license": "MIT", | ||
@@ -28,3 +28,3 @@ "type": "module", | ||
}, | ||
"gitHead": "f37b51f84b8bca80b8bce7887e83d61ac25eb3d5", | ||
"gitHead": "249d2545f3ee35b450ca90d399fc7c3e54a4a7bc", | ||
"devDependencies": { | ||
@@ -31,0 +31,0 @@ "@babel/core": "^7.12.0" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3375
112031