hardened quicklaunch script
This commit is contained in:
@@ -143,9 +143,9 @@ data:
|
||||
})
|
||||
.then(data => {
|
||||
indexed = data.map(x => ({
|
||||
title: x.title,
|
||||
url: x.url,
|
||||
meta: [x.page, x.widget, x.group].filter(Boolean).join(' • ')
|
||||
title: String(x.title ?? x.url ?? ''),
|
||||
url: String(x.url ?? ''),
|
||||
meta: [x.page, x.widget, x.group].filter(Boolean).map(v => String(v)).join(' • ')
|
||||
}));
|
||||
indexLoaded = true;
|
||||
})
|
||||
@@ -166,7 +166,7 @@ data:
|
||||
}
|
||||
|
||||
function normalize(s) {
|
||||
return (s || '').toLowerCase().replace(/\s+/g, ' ').trim();
|
||||
return String(s ?? '').toLowerCase().replace(/\s+/g, ' ').trim();
|
||||
}
|
||||
|
||||
function score(item, q) {
|
||||
|
||||
Reference in New Issue
Block a user