From: Evan You Date: Fri, 11 Oct 2019 22:59:39 +0000 (-0400) Subject: fix(runtime-dom): cast to true for boolean props X-Git-Tag: v3.0.0-alpha.0~483 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=59e18e54781564417e22a97d2eab5520e5661a5c;p=thirdparty%2Fvuejs%2Fcore.git fix(runtime-dom): cast to true for boolean props --- diff --git a/packages/runtime-dom/src/modules/props.ts b/packages/runtime-dom/src/modules/props.ts index 0e87ffcd1e..fbaaac2c8e 100644 --- a/packages/runtime-dom/src/modules/props.ts +++ b/packages/runtime-dom/src/modules/props.ts @@ -18,5 +18,10 @@ export function patchDOMProp( // non-string values will be stringified. el._value = value } - el[key] = value == null ? '' : value + if (value === '' && typeof el[key] === 'boolean') { + // e.g.