mirror of
https://github.com/romancm/gamebrary
synced 2024-12-17 23:03:08 +00:00
null checks
This commit is contained in:
parent
ee3a79f119
commit
54204bf88f
2 changed files with 5 additions and 1 deletions
|
@ -21,7 +21,10 @@ export default {
|
|||
},
|
||||
|
||||
gameProgress() {
|
||||
return this.game && this.progresses[this.platform.code][this.game.id];
|
||||
return this.game
|
||||
&& this.platform
|
||||
&& this.progresses[this.platform.code]
|
||||
&& this.progresses[this.platform.code][this.game.id];
|
||||
},
|
||||
|
||||
gameCardClass() {
|
||||
|
|
|
@ -101,6 +101,7 @@ export default {
|
|||
gameProgress: ({ game, progresses, platform }) => {
|
||||
const gameSelected = game && game.id;
|
||||
const hasProgress = gameSelected
|
||||
&& platform
|
||||
&& progresses[platform.code]
|
||||
&& progresses[platform.code][game.id];
|
||||
|
||||
|
|
Loading…
Reference in a new issue