]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
fix: don't warn mismatch in setHtml
authordaiwei <daiwei521@126.com>
Mon, 22 Sep 2025 07:02:00 +0000 (15:02 +0800)
committerdaiwei <daiwei521@126.com>
Mon, 22 Sep 2025 07:02:00 +0000 (15:02 +0800)
packages/runtime-vapor/src/dom/prop.ts

index 0a4c21739b94fa53b021fdc564e729e0cc9781ce..be4cc08512de946ac19ef645b3ae3069bc7768f8 100644 (file)
@@ -313,24 +313,6 @@ export function setElementText(
 export function setHtml(el: TargetElement, value: any): void {
   value = value == null ? '' : value
 
-  if (isHydrating) {
-    if (el.innerHTML === value) {
-      el.$html = value
-      return
-    }
-
-    if (!isMismatchAllowed(el, MismatchTypes.CHILDREN)) {
-      if (__DEV__ || __FEATURE_PROD_HYDRATION_MISMATCH_DETAILS__) {
-        warn(
-          `Hydration children mismatch on`,
-          el,
-          `\nServer rendered element contains different child nodes from client nodes.`,
-        )
-      }
-      logMismatchError()
-    }
-  }
-
   if (el.$html !== value) {
     el.innerHTML = el.$html = value
   }