@domql/element 2.5.61 → 2.5.62
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 +6 -2
- package/dist/cjs/create.js +7 -2
- package/package.json +2 -2
package/create.js
CHANGED
|
@@ -152,7 +152,7 @@ const createBasedOnType = (element, parent, key, options) => {
|
|
|
152
152
|
const redefineElement = (element, parent, key, options) => {
|
|
153
153
|
const elementWrapper = createBasedOnType(element, parent, key, options)
|
|
154
154
|
|
|
155
|
-
if (options.syntaxv3 || element.props?.syntaxv3 || parent
|
|
155
|
+
if (options.syntaxv3 || element.props?.syntaxv3 || parent?.props?.syntaxv3) {
|
|
156
156
|
element.props.syntaxv3 = true
|
|
157
157
|
return createValidDomqlObjectFromSugar(element, parent, key, options)
|
|
158
158
|
} else if (checkIfKeyIsComponent(key)) {
|
|
@@ -215,7 +215,11 @@ const renderElement = (element, parent, options, attachOptions) => {
|
|
|
215
215
|
const { __ref: ref, key } = element
|
|
216
216
|
|
|
217
217
|
// CREATE a real NODE
|
|
218
|
-
|
|
218
|
+
try {
|
|
219
|
+
createNode(element, options)
|
|
220
|
+
} catch (e) {
|
|
221
|
+
if (ENV === 'test' || ENV === 'development') console.warn(e)
|
|
222
|
+
}
|
|
219
223
|
|
|
220
224
|
if (!ref.__if) {
|
|
221
225
|
parent[key || element.key] = element
|
package/dist/cjs/create.js
CHANGED
|
@@ -117,7 +117,7 @@ const createBasedOnType = (element, parent, key, options) => {
|
|
|
117
117
|
const redefineElement = (element, parent, key, options) => {
|
|
118
118
|
var _a, _b;
|
|
119
119
|
const elementWrapper = createBasedOnType(element, parent, key, options);
|
|
120
|
-
if (options.syntaxv3 || ((_a = element.props) == null ? void 0 : _a.syntaxv3) || ((_b = parent.props) == null ? void 0 : _b.syntaxv3)) {
|
|
120
|
+
if (options.syntaxv3 || ((_a = element.props) == null ? void 0 : _a.syntaxv3) || ((_b = parent == null ? void 0 : parent.props) == null ? void 0 : _b.syntaxv3)) {
|
|
121
121
|
element.props.syntaxv3 = true;
|
|
122
122
|
return (0, import_component.createValidDomqlObjectFromSugar)(element, parent, key, options);
|
|
123
123
|
} else if ((0, import_component.checkIfKeyIsComponent)(key)) {
|
|
@@ -167,7 +167,12 @@ const addElementIntoParentChildren = (element, parent) => {
|
|
|
167
167
|
};
|
|
168
168
|
const renderElement = (element, parent, options, attachOptions) => {
|
|
169
169
|
const { __ref: ref, key } = element;
|
|
170
|
-
|
|
170
|
+
try {
|
|
171
|
+
(0, import_node.default)(element, options);
|
|
172
|
+
} catch (e) {
|
|
173
|
+
if (ENV === "test" || ENV === "development")
|
|
174
|
+
console.warn(e);
|
|
175
|
+
}
|
|
171
176
|
if (!ref.__if) {
|
|
172
177
|
parent[key || element.key] = element;
|
|
173
178
|
return element;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@domql/element",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.62",
|
|
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": "005657169525f7aaa256f4e62d6a4688d6e2046a",
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@babel/core": "^7.12.0"
|
|
37
37
|
}
|