From 8d2aad0de29e13ab5f54a1606d1aff1735e83980 Mon Sep 17 00:00:00 2001 From: Fang Date: Thu, 28 May 2020 20:36:54 +0200 Subject: [PATCH] dbug fe: coax searchable list key into string includes() only works on strings, but we might pass in other types as keys. --- pkg/interface/dbug/src/js/components/searchable-list.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/interface/dbug/src/js/components/searchable-list.js b/pkg/interface/dbug/src/js/components/searchable-list.js index 27b17e9ea4..5b7e1d1de4 100644 --- a/pkg/interface/dbug/src/js/components/searchable-list.js +++ b/pkg/interface/dbug/src/js/components/searchable-list.js @@ -33,7 +33,7 @@ export class SearchableList extends Component { let items = props.items.filter(item => { return state.query.split(' ').reduce((match, query) => { - return match && item.key.includes(query); + return match && ('' + item.key).includes(query); }, true); }) items = items.map(item => @@ -46,4 +46,4 @@ export class SearchableList extends Component {
{items.length === 0 ? 'none' : items}
); } -} \ No newline at end of file +}