Skip to content

Commit

Permalink
fix(render): when rendering a reflected HTML attribute, first check i…
Browse files Browse the repository at this point in the history
…f the property is already set, since it may trigger setters inadvertently
  • Loading branch information
thesephist committed May 11, 2019
1 parent 5509dbc commit 50f158a
Show file tree
Hide file tree
Showing 8 changed files with 595 additions and 591 deletions.
1,170 changes: 586 additions & 584 deletions docs/torus.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion samples/conway/index.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion samples/graph-calc/index.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion samples/gravity/index.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion samples/hn-reader/index.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion samples/markus/index.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion samples/mondrian/index.min.js

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion src/torus.js
Expand Up @@ -335,7 +335,9 @@ const render = (node, previous, next) => {
} else if (attrName in node) { } else if (attrName in node) {
// @debug // @debug
render_debug(`Set <${next.tag}> property ${attrName} = ${next.attrs[attrName]}`); 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 { } else {
if (next.attrs[attrName] !== previous.attrs[attrName]) { if (next.attrs[attrName] !== previous.attrs[attrName]) {
// @debug // @debug
Expand Down

0 comments on commit 50f158a

Please sign in to comment.