fix(runtime-dom): consistently remove boolean attributes for falsy values (#4348)

This commit is contained in:
skirtle
2021-08-16 23:18:36 +01:00
committed by GitHub
parent f855ccb2c1
commit 620a69b871
12 changed files with 70 additions and 22 deletions

View File

@@ -50,9 +50,11 @@ describe('ssr: renderAttrs', () => {
expect(
ssrRenderAttrs({
checked: true,
multiple: false
multiple: false,
readonly: 0,
disabled: ''
})
).toBe(` checked`) // boolean attr w/ false should be ignored
).toBe(` checked disabled`) // boolean attr w/ false should be ignored
})
test('ignore falsy values', () => {