@domql/element
Advanced tools
Comparing version
@@ -225,4 +225,3 @@ 'use strict' | ||
// CREATE a real NODE | ||
try { | ||
const createNestedChild = async () => { | ||
const isInfiniteLoopDetected = detectInfiniteLoop(ref.path) | ||
@@ -232,4 +231,11 @@ if (ref.__uniqId || isInfiniteLoopDetected) return | ||
ref.__uniqId = Math.random() | ||
} catch (e) { | ||
if (ENV === 'test' || ENV === 'development') { | ||
} | ||
// CREATE a real NODE | ||
if (ENV === 'test' || ENV === 'development') { | ||
await createNestedChild() | ||
} else { | ||
try { | ||
await createNestedChild() | ||
} catch (e) { | ||
const path = ref.path | ||
@@ -236,0 +242,0 @@ if (path.includes('ComponentsGrid')) path.splice(0, path.indexOf('ComponentsGrid') + 2) |
@@ -181,3 +181,3 @@ "use strict"; | ||
const { __ref: ref, key } = element; | ||
try { | ||
const createNestedChild = async () => { | ||
const isInfiniteLoopDetected = (0, import_utils.detectInfiniteLoop)(ref.path); | ||
@@ -188,4 +188,9 @@ if (ref.__uniqId || isInfiniteLoopDetected) | ||
ref.__uniqId = Math.random(); | ||
} catch (e) { | ||
if (ENV === "test" || ENV === "development") { | ||
}; | ||
if (ENV === "test" || ENV === "development") { | ||
await createNestedChild(); | ||
} else { | ||
try { | ||
await createNestedChild(); | ||
} catch (e) { | ||
const path = ref.path; | ||
@@ -192,0 +197,0 @@ if (path.includes("ComponentsGrid")) |
@@ -51,3 +51,3 @@ "use strict"; | ||
html: import_html.default, | ||
setContent: import_content.default, | ||
content: import_content.default, | ||
data: import_data.default, | ||
@@ -54,0 +54,0 @@ class: import_classList.classList, |
@@ -76,11 +76,12 @@ "use strict"; | ||
if (params) { | ||
let { childExtend, childProps, props } = params; | ||
if (!childExtend && element.childExtend) | ||
let { childExtend, props } = params; | ||
if (!props) | ||
props = params.props = {}; | ||
if (!childExtend && element.childExtend) { | ||
params.childExtend = element.childExtend; | ||
if (!childProps && element.childProps) | ||
params.childProps = element.childProps; | ||
props.ignoreChildExtend = true; | ||
} | ||
if (!(props == null ? void 0 : props.childProps) && ((_a = element.props) == null ? void 0 : _a.childProps)) { | ||
if (!props) | ||
props = params.props = {}; | ||
props.childProps = element.props.childProps; | ||
props.ignoreChildProps = true; | ||
} | ||
@@ -87,0 +88,0 @@ if (lazyLoad) { |
@@ -167,3 +167,3 @@ import createNode from "./node.js"; | ||
const { __ref: ref, key } = element; | ||
try { | ||
const createNestedChild = async () => { | ||
const isInfiniteLoopDetected = detectInfiniteLoop(ref.path); | ||
@@ -174,4 +174,9 @@ if (ref.__uniqId || isInfiniteLoopDetected) | ||
ref.__uniqId = Math.random(); | ||
} catch (e) { | ||
if (ENV === "test" || ENV === "development") { | ||
}; | ||
if (ENV === "test" || ENV === "development") { | ||
await createNestedChild(); | ||
} else { | ||
try { | ||
await createNestedChild(); | ||
} catch (e) { | ||
const path = ref.path; | ||
@@ -178,0 +183,0 @@ if (path.includes("ComponentsGrid")) |
import attr from "./attr.js"; | ||
import { classList } from "./classList.js"; | ||
import setContent from "./content.js"; | ||
import content from "./content.js"; | ||
import data from "./data.js"; | ||
@@ -15,3 +15,3 @@ import html from "./html.js"; | ||
html, | ||
setContent, | ||
content, | ||
data, | ||
@@ -18,0 +18,0 @@ class: classList, |
@@ -50,11 +50,12 @@ import { deepContains, setContentKey } from "@domql/utils"; | ||
if (params) { | ||
let { childExtend, childProps, props } = params; | ||
if (!childExtend && element.childExtend) | ||
let { childExtend, props } = params; | ||
if (!props) | ||
props = params.props = {}; | ||
if (!childExtend && element.childExtend) { | ||
params.childExtend = element.childExtend; | ||
if (!childProps && element.childProps) | ||
params.childProps = element.childProps; | ||
props.ignoreChildExtend = true; | ||
} | ||
if (!(props == null ? void 0 : props.childProps) && ((_a = element.props) == null ? void 0 : _a.childProps)) { | ||
if (!props) | ||
props = params.props = {}; | ||
props.childProps = element.props.childProps; | ||
props.ignoreChildProps = true; | ||
} | ||
@@ -61,0 +62,0 @@ if (lazyLoad) { |
@@ -5,3 +5,3 @@ 'use strict' | ||
import { classList } from './classList.js' | ||
import setContent from './content.js' | ||
import content from './content.js' | ||
import data from './data.js' | ||
@@ -19,3 +19,3 @@ import html from './html.js' | ||
html, | ||
setContent, | ||
content, | ||
data, | ||
@@ -22,0 +22,0 @@ class: classList, |
{ | ||
"name": "@domql/element", | ||
"version": "2.5.187", | ||
"version": "2.5.188", | ||
"license": "MIT", | ||
@@ -35,3 +35,3 @@ "type": "module", | ||
}, | ||
"gitHead": "c150bfbbdd51b19d25c93f10334d54175cea9d1d", | ||
"gitHead": "b240e178ba2f5c7a6d0f8fd28bbe7936e086642c", | ||
"devDependencies": { | ||
@@ -38,0 +38,0 @@ "@babel/core": "^7.12.0" |
11
set.js
@@ -54,8 +54,11 @@ 'use strict' | ||
if (params) { | ||
let { childExtend, childProps, props } = params | ||
if (!childExtend && element.childExtend) params.childExtend = element.childExtend | ||
if (!childProps && element.childProps) params.childProps = element.childProps | ||
let { childExtend, props } = params | ||
if (!props) props = params.props = {} | ||
if (!childExtend && element.childExtend) { | ||
params.childExtend = element.childExtend | ||
props.ignoreChildExtend = true | ||
} | ||
if (!props?.childProps && element.props?.childProps) { | ||
if (!props) props = params.props = {} | ||
props.childProps = element.props.childProps | ||
props.ignoreChildProps = true | ||
} | ||
@@ -62,0 +65,0 @@ |
272175
0.11%7847
0.26%