Add deep to home watcher

This commit is contained in:
Torjus Håkestad 2021-04-11 11:52:23 +02:00
parent 2467e7ba47
commit b52b519c5e

View File

@ -57,7 +57,7 @@ interface TotalStatsResult {
export default class Home extends Vue {
totalStats?: TotalStatsResult[];
@Watch('totalStats')
@Watch('totalStats', { immediate: true, deep: true })
getStat(key: TotalStatsHeaders): string | undefined {
const result = this.totalStats?.find((elem) => elem.name === key);
if (result) {