Skip to content

Commit df9f8f2

Browse files
committed
fix: don't warn mismatch in setHtml
1 parent 2a4ce48 commit df9f8f2

File tree

1 file changed

+0
-18
lines changed
  • packages/runtime-vapor/src/dom

1 file changed

+0
-18
lines changed

packages/runtime-vapor/src/dom/prop.ts

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -313,24 +313,6 @@ export function setElementText(
313313
export function setHtml(el: TargetElement, value: any): void {
314314
value = value == null ? '' : value
315315

316-
if (isHydrating) {
317-
if (el.innerHTML === value) {
318-
el.$html = value
319-
return
320-
}
321-
322-
if (!isMismatchAllowed(el, MismatchTypes.CHILDREN)) {
323-
if (__DEV__ || __FEATURE_PROD_HYDRATION_MISMATCH_DETAILS__) {
324-
warn(
325-
`Hydration children mismatch on`,
326-
el,
327-
`\nServer rendered element contains different child nodes from client nodes.`,
328-
)
329-
}
330-
logMismatchError()
331-
}
332-
}
333-
334316
if (el.$html !== value) {
335317
el.innerHTML = el.$html = value
336318
}

0 commit comments

Comments
 (0)