From ee6fc3c0b4339e39663cbf7501331fcca3d2e3fc Mon Sep 17 00:00:00 2001 From: VladimirTechMan Date: Tue, 24 Jul 2018 11:17:45 -0400 Subject: [PATCH] Removing unused value from return statement in _eachAncestorReverse() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A minor cleanup. When method _eachAncestorReverse() does not have the top node argument, it returns "nothing" (undefined). Thus, the true value returned when it has the top argument – and the current Konva code never checks or uses that returned value – seems to be just a side effect of code copy-paste or alike, done in the past. Unless the function was planned to return a boolean value for a a good reason (in which case we'd need to add a return value to its end), let's remove the unused value from return. --- src/Node.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Node.js b/src/Node.js index 44f4bd9a..9a2a60dc 100644 --- a/src/Node.js +++ b/src/Node.js @@ -1052,7 +1052,7 @@ // func with this because it will be the only node if (top && top._id === this._id) { func(this); - return true; + return; } family.unshift(this);