@domql/render
Advanced tools
Comparing version 2.4.7 to 2.5.18
@@ -5,3 +5,3 @@ 'use strict' | ||
import { canRender } from '@domql/event' | ||
import { exec, isString, isValidHtmlTag } from '@domql/utils' | ||
import { exec, isObject, isString, isValidHtmlTag } from '@domql/utils' | ||
@@ -25,3 +25,3 @@ const cache = {} | ||
export const detectTag = element => { | ||
let { tag, key } = element | ||
let { tag, key, props } = element | ||
tag = exec(tag, element) | ||
@@ -31,2 +31,7 @@ | ||
if (isObject(props) && isString(props.tag)) { | ||
const tagExists = isValidHtmlTag(props.tag) | ||
if (tagExists) return props.tag | ||
} | ||
if (isString(tag)) { | ||
@@ -33,0 +38,0 @@ const tagExists = isValidHtmlTag(tag) |
@@ -46,6 +46,11 @@ "use strict"; | ||
const detectTag = (element) => { | ||
let { tag, key } = element; | ||
let { tag, key, props } = element; | ||
tag = (0, import_utils.exec)(tag, element); | ||
if (tag === true) | ||
tag = key; | ||
if ((0, import_utils.isObject)(props) && (0, import_utils.isString)(props.tag)) { | ||
const tagExists = (0, import_utils.isValidHtmlTag)(props.tag); | ||
if (tagExists) | ||
return props.tag; | ||
} | ||
if ((0, import_utils.isString)(tag)) { | ||
@@ -52,0 +57,0 @@ const tagExists = (0, import_utils.isValidHtmlTag)(tag); |
{ | ||
"name": "@domql/render", | ||
"version": "2.4.7", | ||
"version": "2.5.18", | ||
"license": "MIT", | ||
@@ -31,3 +31,3 @@ "type": "module", | ||
}, | ||
"gitHead": "fd9683a7d42893983463967fa512ac095a6a36e9" | ||
"gitHead": "4aeead0b153d4cd5430694ecf45a5d3052f9f9f5" | ||
} |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
10630
237
0