@domql/element 2.5.13 → 2.5.15
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 +1 -3
- package/dist/cjs/set.js +2 -1
- package/extend.js +1 -3
- package/package.json +2 -2
- package/set.js +3 -2
package/dist/cjs/extend.js
CHANGED
|
@@ -35,9 +35,7 @@ const applyExtend = (element, parent, options = {}) => {
|
|
|
35
35
|
let childExtendStack = [];
|
|
36
36
|
if (parent) {
|
|
37
37
|
element.parent = parent;
|
|
38
|
-
if (!options.ignoreChildExtend) {
|
|
39
|
-
if (props && props.ignoreChildExtend)
|
|
40
|
-
return;
|
|
38
|
+
if (!options.ignoreChildExtend && !(props && props.ignoreChildExtend)) {
|
|
41
39
|
childExtendStack = (0, import_utils2.getExtendStack)(parent.childExtend);
|
|
42
40
|
const ignoreChildExtendRecursive = props && props.ignoreChildExtendRecursive;
|
|
43
41
|
if (parent.childExtendRecursive && !ignoreChildExtendRecursive) {
|
package/dist/cjs/set.js
CHANGED
|
@@ -39,7 +39,8 @@ var import_content = require("./mixins/content");
|
|
|
39
39
|
const set = function(params, options = {}, el) {
|
|
40
40
|
const element = el || this;
|
|
41
41
|
const __contentRef = element.content && element.content.__ref;
|
|
42
|
-
if (__contentRef && __contentRef.__cached && (0, import_utils.
|
|
42
|
+
if (__contentRef && __contentRef.__cached && (0, import_utils.deepContains)(params, element.content)) {
|
|
43
|
+
console.log("is content equal");
|
|
43
44
|
return element;
|
|
44
45
|
}
|
|
45
46
|
(0, import_content.removeContent)(element);
|
package/extend.js
CHANGED
|
@@ -31,9 +31,7 @@ export const applyExtend = (element, parent, options = {}) => {
|
|
|
31
31
|
if (parent) {
|
|
32
32
|
element.parent = parent
|
|
33
33
|
// Assign parent attr to the element
|
|
34
|
-
if (!options.ignoreChildExtend) {
|
|
35
|
-
if (props && props.ignoreChildExtend) return
|
|
36
|
-
|
|
34
|
+
if (!options.ignoreChildExtend && !(props && props.ignoreChildExtend)) {
|
|
37
35
|
childExtendStack = getExtendStack(parent.childExtend)
|
|
38
36
|
|
|
39
37
|
// if (parent.childExtendRecursive && (props && !props.ignoreChildExtendRecursive)) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@domql/element",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.15",
|
|
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": "2d858d6237f30594a8bbe97c6aca8bc6dc925f85",
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@babel/core": "^7.12.0"
|
|
37
37
|
}
|
package/set.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { deepContains } from '@domql/utils'
|
|
4
4
|
|
|
5
5
|
import create from './create'
|
|
6
6
|
import OPTIONS from './cache/options'
|
|
@@ -11,7 +11,8 @@ const set = function (params, options = {}, el) {
|
|
|
11
11
|
const element = el || this
|
|
12
12
|
const __contentRef = element.content && element.content.__ref
|
|
13
13
|
|
|
14
|
-
if (__contentRef && __contentRef.__cached &&
|
|
14
|
+
if (__contentRef && __contentRef.__cached && deepContains(params, element.content)) {
|
|
15
|
+
console.log('is content equal')
|
|
15
16
|
return element
|
|
16
17
|
}
|
|
17
18
|
removeContent(element)
|