Skip to content
Permalink
Browse files

fix(render): when rendering a reflected HTML attribute, first check i…

…f the property is already set, since it may trigger setters inadvertently
  • Loading branch information...
thesephist committed May 11, 2019
1 parent 5509dbc commit 50f158a6ae282d49bb3cf9cc75cd364939efb2f1

Large diffs are not rendered by default.

Oops, something went wrong.

Large diffs are not rendered by default.

Oops, something went wrong.

Large diffs are not rendered by default.

Oops, something went wrong.

Large diffs are not rendered by default.

Oops, something went wrong.

Large diffs are not rendered by default.

Oops, something went wrong.

Large diffs are not rendered by default.

Oops, something went wrong.

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -335,7 +335,9 @@ const render = (node, previous, next) => {
} else if (attrName in node) {
// @debug
render_debug(`Set <${next.tag}> property ${attrName} = ${next.attrs[attrName]}`);
node[attrName] = next.attrs[attrName];
if (previous.attrs[attrName] !== next.attrs[attrName]) {
node[attrName] = next.attrs[attrName];
}
} else {
if (next.attrs[attrName] !== previous.attrs[attrName]) {
// @debug

0 comments on commit 50f158a

Please sign in to comment.
You can’t perform that action at this time.