Move list manipulation outside of compute

This commit is contained in:
Sam Carlton 2020-11-21 16:01:31 -06:00
parent b5305888c7
commit 735f1d07eb

View file

@ -61,6 +61,13 @@ function byTimeThenNull (appA, appB) {
return appB.lastUpdated.timestamp - appA.lastUpdated.timestamp
}
const sortedAppList = appList.sort(byTimeThenNull)
const mergedList = [
...sortedAppList,
...gameList
]
export default {
components: {
Search,
@ -73,10 +80,7 @@ export default {
},
computed: {
appList() {
return [
...appList.sort(byTimeThenNull),
...gameList
]
return mergedList
}
}
}