created mergedConfig getter to avoid obnoxious checks for undefined everywhere
This commit is contained in:
parent
aadd36f3ec
commit
979e170bd6
9 changed files with 64 additions and 64 deletions
|
@ -1,10 +1,9 @@
|
|||
import { mapGetters } from 'vuex'
|
||||
|
||||
const FavoriteButton = {
|
||||
props: ['status', 'loggedIn'],
|
||||
data () {
|
||||
return {
|
||||
hidePostStatsLocal: typeof this.$store.state.config.hidePostStats === 'undefined'
|
||||
? this.$store.state.instance.hidePostStats
|
||||
: this.$store.state.config.hidePostStats,
|
||||
animated: false
|
||||
}
|
||||
},
|
||||
|
@ -28,7 +27,8 @@ const FavoriteButton = {
|
|||
'icon-star': this.status.favorited,
|
||||
'animate-spin': this.animated
|
||||
}
|
||||
}
|
||||
},
|
||||
...mapGetters(['mergedConfig'])
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue