Use optional chaining

This commit is contained in:
Sam Carlton 2021-01-02 13:57:20 -06:00
parent 0a648eddae
commit 5578509822
2 changed files with 6 additions and 12 deletions

View file

@ -350,9 +350,7 @@ export default {
getAppCategory,
getAppEndpoint,
getSearchLinks (app) {
if (typeof app.searchLinks === 'undefined') return []
return app.searchLinks
return app?.searchLinks || []
},
// Search priorities
titleStartsWith (query, app) {