|
@@ -2,6 +2,7 @@ import {
|
|
|
MismatchTypes,
|
|
MismatchTypes,
|
|
|
isMismatchAllowed,
|
|
isMismatchAllowed,
|
|
|
isHydrating as isVdomHydrating,
|
|
isHydrating as isVdomHydrating,
|
|
|
|
|
+ logMismatchError,
|
|
|
warn,
|
|
warn,
|
|
|
} from '@vue/runtime-dom'
|
|
} from '@vue/runtime-dom'
|
|
|
import { type Namespace, Namespaces } from '@vue/shared'
|
|
import { type Namespace, Namespaces } from '@vue/shared'
|
|
@@ -483,16 +484,6 @@ function warnHydrationNodeMismatch(node: Node, expected: unknown): void {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-let hasLoggedMismatchError = false
|
|
|
|
|
-export const logMismatchError = (): void => {
|
|
|
|
|
- if (__TEST__ || hasLoggedMismatchError) {
|
|
|
|
|
- return
|
|
|
|
|
- }
|
|
|
|
|
- // this error should show up in production
|
|
|
|
|
- console.error('Hydration completed but contains mismatches.')
|
|
|
|
|
- hasLoggedMismatchError = true
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
export function removeFragmentNodes(node: Node, endAnchor?: Node): void {
|
|
export function removeFragmentNodes(node: Node, endAnchor?: Node): void {
|
|
|
const parent = parentNode(node)
|
|
const parent = parentNode(node)
|
|
|
if (!parent) {
|
|
if (!parent) {
|