Skip to content

Commit

Permalink
Remove assignment in condition
Browse files Browse the repository at this point in the history
  • Loading branch information
golopot committed May 10, 2019
1 parent f7fa7c5 commit abfe7a2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/util/Components.js
Expand Up @@ -96,12 +96,13 @@ class Components {
* @param {Object} props Additional properties to add to the component.
*/
set(node, props) {
let component;
while (!(component = this._list[getId(node)])) {
let component = this._list[getId(node)];
while (!component) {
node = node.parent;
if (!node) {
return;
}
component = this._list[getId(node)];
}

Object.assign(
Expand Down

0 comments on commit abfe7a2

Please sign in to comment.