@domql/element 2.4.7 → 2.4.8
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/cjs/extend.js +3 -2
- package/extend.js +3 -2
- package/package.json +2 -2
package/dist/cjs/extend.js
CHANGED
|
@@ -49,8 +49,9 @@ const applyExtend = (element, parent, options = {}) => {
|
|
|
49
49
|
if (props && props.ignoreChildExtend)
|
|
50
50
|
return;
|
|
51
51
|
childExtendStack = (0, import_utils2.getExtendStack)(parent.childExtend);
|
|
52
|
-
if (parent.childExtendRecursive) {
|
|
53
|
-
const
|
|
52
|
+
if (parent.childExtendRecursive || props && props.ignoreChildExtendRecursive) {
|
|
53
|
+
const propsChildExtendRecursive = props && !props.ignoreChildExtendRecursive;
|
|
54
|
+
const canExtendRecursive = propsChildExtendRecursive && element.key !== "__text";
|
|
54
55
|
if (canExtendRecursive) {
|
|
55
56
|
const childExtendRecursiveStack = (0, import_utils2.getExtendStack)(parent.childExtendRecursive);
|
|
56
57
|
childExtendStack = childExtendStack.concat(childExtendRecursiveStack);
|
package/extend.js
CHANGED
|
@@ -44,8 +44,9 @@ export const applyExtend = (element, parent, options = {}) => {
|
|
|
44
44
|
childExtendStack = getExtendStack(parent.childExtend)
|
|
45
45
|
|
|
46
46
|
// if (parent.childExtendRecursive && (props && !props.ignoreChildExtendRecursive)) {
|
|
47
|
-
if (parent.childExtendRecursive) {
|
|
48
|
-
const
|
|
47
|
+
if (parent.childExtendRecursive || (props && props.ignoreChildExtendRecursive)) {
|
|
48
|
+
const propsChildExtendRecursive = props && !props.ignoreChildExtendRecursive
|
|
49
|
+
const canExtendRecursive = propsChildExtendRecursive && element.key !== '__text'
|
|
49
50
|
if (canExtendRecursive) {
|
|
50
51
|
const childExtendRecursiveStack = getExtendStack(parent.childExtendRecursive)
|
|
51
52
|
// add error if childExtendRecursive contains element which goes to infinite loop
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@domql/element",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.8",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "index.js",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@domql/state": "latest",
|
|
32
32
|
"@domql/utils": "latest"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "7822f906ac9a99ba2c2882eceacbd39516dc4b2d",
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@babel/core": "^7.12.0"
|
|
37
37
|
}
|