mirror of https://github.com/vuejs/core.git
fix(hydration): should not warn mismatch for nullish prop
This commit is contained in:
parent
0b6effb423
commit
33159a5916
|
@ -1397,6 +1397,7 @@ describe('SSR hydration', () => {
|
|||
mountWithHydration(`<div spellcheck></div>`, () =>
|
||||
h('div', { spellcheck: '' })
|
||||
)
|
||||
mountWithHydration(`<div></div>`, () => h('div', { id: undefined }))
|
||||
// boolean
|
||||
mountWithHydration(`<select multiple></div>`, () =>
|
||||
h('select', { multiple: true })
|
||||
|
|
|
@ -740,7 +740,9 @@ function propHasMismatch(el: Element, key: string, clientValue: any): boolean {
|
|||
? includeBooleanAttr(clientValue)
|
||||
? ''
|
||||
: false
|
||||
: String(clientValue)
|
||||
: clientValue == null
|
||||
? false
|
||||
: String(clientValue)
|
||||
if (actual !== expected) {
|
||||
mismatchType = `attribute`
|
||||
mismatchKey = key
|
||||
|
|
Loading…
Reference in New Issue