|
|
@@ -757,11 +757,14 @@ function propHasMismatch(
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ // eslint-disable-next-line no-restricted-syntax
|
|
|
const root = instance?.subTree
|
|
|
if (
|
|
|
vnode === root ||
|
|
|
+ // eslint-disable-next-line no-restricted-syntax
|
|
|
(root?.type === Fragment && (root.children as VNode[]).includes(vnode))
|
|
|
) {
|
|
|
+ // eslint-disable-next-line no-restricted-syntax
|
|
|
const cssVars = instance?.getCssVars?.()
|
|
|
for (const key in cssVars) {
|
|
|
expectedMap.set(`--${key}`, String(cssVars[key]))
|
|
|
@@ -842,7 +845,9 @@ function toStyleMap(str: string): Map<string, string> {
|
|
|
const styleMap: Map<string, string> = new Map()
|
|
|
for (const item of str.split(';')) {
|
|
|
let [key, value] = item.split(':')
|
|
|
+ // eslint-disable-next-line no-restricted-syntax
|
|
|
key = key?.trim()
|
|
|
+ // eslint-disable-next-line no-restricted-syntax
|
|
|
value = value?.trim()
|
|
|
if (key && value) {
|
|
|
styleMap.set(key, value)
|