From abfe7a2133c518f4d4357070bec1e33ee60c9e60 Mon Sep 17 00:00:00 2001 From: golopot Date: Sat, 11 May 2019 03:10:08 +0800 Subject: [PATCH] Remove assignment in condition --- lib/util/Components.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/util/Components.js b/lib/util/Components.js index f9a4ac5e7e..b9de462d2e 100644 --- a/lib/util/Components.js +++ b/lib/util/Components.js @@ -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(