@domql/element 2.5.98 → 2.5.100

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/create.js CHANGED
@@ -309,11 +309,11 @@ const addCaching = (element, parent) => {
309
309
  if (!ref.root) ref.root = hasRoot ? element : parentRef.root
310
310
 
311
311
  // set the PATH array
312
- if (ENV === 'test' || ENV === 'development') {
313
- if (!parentRef) parentRef = parent.ref = {}
314
- if (!parentRef.__path) parentRef.__path = []
315
- ref.__path = parentRef.__path.concat(element.key)
316
- }
312
+ // if (ENV === 'test' || ENV === 'development') {
313
+ if (!parentRef) parentRef = parent.ref = {}
314
+ if (!parentRef.__path) parentRef.__path = []
315
+ ref.__path = parentRef.__path.concat(element.key)
316
+ // }
317
317
  }
318
318
 
319
319
  const onlyResolveExtends = (element, parent, key, options) => {
@@ -239,13 +239,11 @@ const addCaching = (element, parent) => {
239
239
  const hasRoot = parent && parent.key === ":root";
240
240
  if (!ref.root)
241
241
  ref.root = hasRoot ? element : parentRef.root;
242
- if (ENV === "test" || ENV === "development") {
243
- if (!parentRef)
244
- parentRef = parent.ref = {};
245
- if (!parentRef.__path)
246
- parentRef.__path = [];
247
- ref.__path = parentRef.__path.concat(element.key);
248
- }
242
+ if (!parentRef)
243
+ parentRef = parent.ref = {};
244
+ if (!parentRef.__path)
245
+ parentRef.__path = [];
246
+ ref.__path = parentRef.__path.concat(element.key);
249
247
  };
250
248
  const onlyResolveExtends = (element, parent, key, options) => {
251
249
  const { __ref: ref } = element;
@@ -89,7 +89,7 @@ const lookdown = function(param) {
89
89
  return childElem;
90
90
  }
91
91
  }
92
- const lookdown2 = childElem.lookdown(param);
92
+ const lookdown2 = childElem == null ? void 0 : childElem.lookdown(param);
93
93
  if (lookdown2)
94
94
  return lookdown2;
95
95
  }
package/methods/index.js CHANGED
@@ -58,7 +58,7 @@ export const lookdown = function (param) {
58
58
  return childElem
59
59
  }
60
60
  }
61
- const lookdown = childElem.lookdown(param)
61
+ const lookdown = childElem?.lookdown(param)
62
62
  if (lookdown) return lookdown
63
63
  }
64
64
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@domql/element",
3
- "version": "2.5.98",
3
+ "version": "2.5.100",
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": "6318fa362595b70f826d48c5eb8fffbc2a6a5443",
34
+ "gitHead": "38b74a597edc2f9454a81b892505282a944fd5b9",
35
35
  "devDependencies": {
36
36
  "@babel/core": "^7.12.0"
37
37
  }