From 6f85c88a48622118322c7a2592cc5d4f50c1be95 Mon Sep 17 00:00:00 2001 From: Oleksandr Zhyian Date: Fri, 27 Dec 2024 08:55:15 +0200 Subject: [PATCH] refactor: switch to 'some' for better readability and performance benefits Co-authored-by: Volodymyr Shelmuk --- resources/ts/filters/filter-dropdown.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/ts/filters/filter-dropdown.ts b/resources/ts/filters/filter-dropdown.ts index e4921f1..3c5a641 100644 --- a/resources/ts/filters/filter-dropdown.ts +++ b/resources/ts/filters/filter-dropdown.ts @@ -35,8 +35,8 @@ class Dropdown { ( checkbox ) => checkbox.checked ); - return ! this.initialState.every( - ( value, index ) => value === currentState[ index ] + return this.initialState.some( + ( value, index ) => value !== currentState[ index ] ); }