Catch undefined on makeSearchableList

This commit is contained in:
Sam Carlton 2022-02-27 16:00:54 -06:00
parent 921a25e758
commit 12b6578dd5

View file

@ -43,6 +43,11 @@ export function makeSearchableList ( listSet ) {
]) ])
listSet.forEach( ( searchableItem ) => { listSet.forEach( ( searchableItem ) => {
if ( typeof searchableItem === 'undefined' ) {
throw new Error('searchableItem is undefined')
}
// If this is the first items // If this is the first items
// then store the keys // then store the keys
if ( firstLoop ) { if ( firstLoop ) {