fix(runtime-dom): capture errors when setting value for IDL (#3578)
fix #3576
This commit is contained in:
@@ -52,7 +52,10 @@ export function patchDOMProp(
|
||||
return
|
||||
} else if (type === 'number') {
|
||||
// e.g. <img :width="null">
|
||||
el[key] = 0
|
||||
// the value of some IDL attr must be greater than 0, e.g. input.size = 0 -> error
|
||||
try {
|
||||
el[key] = 0
|
||||
} catch {}
|
||||
el.removeAttribute(key)
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user