From 31d31fcddafe08df9172c946b10d8381a4a8986e Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Fri, 2 Oct 2020 16:53:41 +0100 Subject: [PATCH] Fix multiselect crashing in certain circumstances --- .../builder/src/components/common/MultiSelect.svelte | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/builder/src/components/common/MultiSelect.svelte b/packages/builder/src/components/common/MultiSelect.svelte index f2fa530530..22cc3f16be 100644 --- a/packages/builder/src/components/common/MultiSelect.svelte +++ b/packages/builder/src/components/common/MultiSelect.svelte @@ -61,6 +61,9 @@ function handleOptionMousedown(e) { const value = e.target.dataset.value + if (value == null) { + return + } if (selected[value]) { remove(value) } else { @@ -118,7 +121,7 @@ {/each} {#if !options.length} -
  • No results
  • +
  • No results
  • {/if} {/if} @@ -264,6 +267,10 @@ li:not(.selected):hover { background-color: var(--grey-1); } + li.no-results:hover { + background-color: white; + cursor: initial; + } .hidden { display: none;