From e6bf89b89de0e2eb6edd35a8e9fbb47f709f5da2 Mon Sep 17 00:00:00 2001 From: lukasnys Date: Tue, 23 Jul 2024 13:50:01 +0200 Subject: [PATCH] cleanup: remove unused property from computed watchlist --- addon/-private/collapse-tree.js | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/addon/-private/collapse-tree.js b/addon/-private/collapse-tree.js index 1f42a7c8b..9826a882b 100644 --- a/addon/-private/collapse-tree.js +++ b/addon/-private/collapse-tree.js @@ -45,24 +45,20 @@ export const TableRowMeta = EmberObject.extend({ }), // eslint-disable-next-line ember/use-brace-expansion - isSelected: computed( - '_tree.{selection.[],selectionMatchFunction}', - '_parentMeta.isSelected', - function() { - let rowValue = get(this, '_rowValue'); - let selection = get(this, '_tree.selection'); - let selectionMatchFunction = get(this, '_tree.selectionMatchFunction'); - - if (isArray(selection)) { - return this.get('isGroupSelected'); - } + isSelected: computed('_tree.{selection.[],selectionMatchFunction}', function() { + let rowValue = get(this, '_rowValue'); + let selection = get(this, '_tree.selection'); + let selectionMatchFunction = get(this, '_tree.selectionMatchFunction'); - let isRowSelection = selectionMatchFunction - ? selectionMatchFunction(selection, rowValue) - : selection === rowValue; - return isRowSelection || get(this, '_parentMeta.isSelected'); + if (isArray(selection)) { + return this.get('isGroupSelected'); } - ), + + let isRowSelection = selectionMatchFunction + ? selectionMatchFunction(selection, rowValue) + : selection === rowValue; + return isRowSelection || get(this, '_parentMeta.isSelected'); + }), isGroupSelected: computed( '_tree.{selection.[],selectionMatchFunction}',