From 12b6578dd5c487243245c56715306fad83bdec86 Mon Sep 17 00:00:00 2001 From: Sam Carlton Date: Sun, 27 Feb 2022 16:00:54 -0600 Subject: [PATCH] Catch undefined on makeSearchableList --- helpers/searchable-list.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/helpers/searchable-list.js b/helpers/searchable-list.js index 95b3bd7..a630da0 100644 --- a/helpers/searchable-list.js +++ b/helpers/searchable-list.js @@ -43,6 +43,11 @@ export function makeSearchableList ( listSet ) { ]) listSet.forEach( ( searchableItem ) => { + + if ( typeof searchableItem === 'undefined' ) { + throw new Error('searchableItem is undefined') + } + // If this is the first items // then store the keys if ( firstLoop ) {