Warn about reusing mutated attrs object - fixes #2719

This commit is contained in:
Stephan Hoyer 2022-01-29 13:16:04 +01:00
parent 8ef7844f5a
commit b97fd59381
2 changed files with 20 additions and 0 deletions

View file

@ -800,6 +800,9 @@ module.exports = function($window) {
if ("selectedIndex" in attrs) setAttr(vnode, "selectedIndex", null, attrs.selectedIndex, undefined)
}
function updateAttrs(vnode, old, attrs, ns) {
if (old && old === attrs) {
console.warn("Don't reuse attrs object, use new object for every redraw, this will throw in next major")
}
if (attrs != null) {
// If you assign an input type that is not supported by IE 11 with an assignment expression, an error will occur.
//