mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-18 06:44:46 -07:00
Use optional chaining
This commit is contained in:
parent
0a648eddae
commit
5578509822
2 changed files with 6 additions and 12 deletions
|
|
@ -92,11 +92,11 @@ export default {
|
|||
// Filter app list to leave out data not needed for search
|
||||
initialAppList: sortedAppList.map( app => {
|
||||
|
||||
let searchLinks = []
|
||||
const searchLinks = allAppSearchLinks?.[app.slug] || []
|
||||
|
||||
if (typeof allAppSearchLinks[app.slug] !== 'undefined') {
|
||||
searchLinks = allAppSearchLinks[app.slug]
|
||||
}
|
||||
// if (typeof allAppSearchLinks[app.slug] !== 'undefined') {
|
||||
// searchLinks = allAppSearchLinks[app.slug]
|
||||
// }
|
||||
|
||||
return {
|
||||
name: app.name,
|
||||
|
|
@ -211,11 +211,7 @@ export default {
|
|||
|
||||
this.fetchedAppList = fetchedLists.flat(1).map( app => {
|
||||
|
||||
let searchLinks = []
|
||||
|
||||
if (typeof this.allAppSearchLinks[app.slug] !== 'undefined') {
|
||||
searchLinks = this.allAppSearchLinks[app.slug]
|
||||
}
|
||||
const searchLinks = this.allAppSearchLinks?.[app.slug] || []
|
||||
|
||||
return {
|
||||
...app,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue