From 8c562b219f52ce5a6cfe80a35ee35e70d45094a1 Mon Sep 17 00:00:00 2001 From: Carlos Gomes Date: Fri, 22 Nov 2024 15:45:26 +0100 Subject: [PATCH] Fix events not being triggered on last element deselection --- packages/vanilla/src/index.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/packages/vanilla/src/index.ts b/packages/vanilla/src/index.ts index dcc8c92..0b7cb16 100644 --- a/packages/vanilla/src/index.ts +++ b/packages/vanilla/src/index.ts @@ -833,10 +833,6 @@ export default class SelectionArea extends EventTarget { stored.includes(el) ); - if (!elements.length) { - return; - } - this._selection.stored = stored.filter(el => !elements.includes(el)); this._selection.selected = selected.filter(el => !elements.includes(el)); this._selection.changed.added = [];