@domql/element 2.30.2 → 2.31.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.
@@ -93,6 +93,10 @@ function lookdown(param) {
93
93
  for (let i = 0; i < children.length; i++) {
94
94
  const v = children[i];
95
95
  const childElem = el[v];
96
+ if (!childElem)
97
+ return this.warn(
98
+ "Element found in children array but it does not exist in parent"
99
+ );
96
100
  if (v === param) return childElem;
97
101
  else if ((0, import_utils.isFunction)(param)) {
98
102
  const exec = param(childElem, childElem.state, childElem.context);
@@ -51,6 +51,10 @@ function lookdown(param) {
51
51
  for (let i = 0; i < children.length; i++) {
52
52
  const v = children[i];
53
53
  const childElem = el[v];
54
+ if (!childElem)
55
+ return this.warn(
56
+ "Element found in children array but it does not exist in parent"
57
+ );
54
58
  if (v === param) return childElem;
55
59
  else if (isFunction(param)) {
56
60
  const exec = param(childElem, childElem.state, childElem.context);
package/methods/index.js CHANGED
@@ -67,6 +67,11 @@ export function lookdown(param) {
67
67
  const v = children[i]
68
68
  const childElem = el[v]
69
69
 
70
+ if (!childElem)
71
+ return this.warn(
72
+ 'Element found in children array but it does not exist in parent'
73
+ )
74
+
70
75
  if (v === param) return childElem
71
76
  else if (isFunction(param)) {
72
77
  const exec = param(childElem, childElem.state, childElem.context)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@domql/element",
3
- "version": "2.30.2",
3
+ "version": "2.31.0",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "module": "index.js",
@@ -27,12 +27,12 @@
27
27
  "prepublish": "npx rimraf -I dist && npm run build && npm run copy:package:cjs"
28
28
  },
29
29
  "dependencies": {
30
- "@domql/event": "^2.30.2",
31
- "@domql/render": "^2.30.2",
32
- "@domql/state": "^2.30.2",
33
- "@domql/utils": "^2.30.2"
30
+ "@domql/event": "^2.31.0",
31
+ "@domql/render": "^2.31.0",
32
+ "@domql/state": "^2.31.0",
33
+ "@domql/utils": "^2.31.0"
34
34
  },
35
- "gitHead": "f16f5ece1e6e13dc967e183452017b49a104cca1",
35
+ "gitHead": "dd5c64895320d678f28ca585c9fd4e4550a483cd",
36
36
  "devDependencies": {
37
37
  "@babel/core": "^7.27.1"
38
38
  }