From 056ae437331bf92072a3b8c4993d2b6082af9fb3 Mon Sep 17 00:00:00 2001 From: KevinMidboe Date: Tue, 10 Mar 2020 19:03:22 +0100 Subject: [PATCH] Default color val is null, stricter localWinners statement. --- src/components/RegisterPage.vue | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/RegisterPage.vue b/src/components/RegisterPage.vue index fd85501..8c56ffd 100644 --- a/src/components/RegisterPage.vue +++ b/src/components/RegisterPage.vue @@ -127,10 +127,10 @@ components: { TextToast, Wine, ScanToVinmonopolet }, data() { return { - red: 0, - blue: 0, - green: 0, - yellow: 0, + red: null, + blue: null, + green: null, + yellow: null, payed: undefined, winners: [], wines: [], @@ -310,7 +310,7 @@ } let localWinners = localStorage.getItem("winners"); - if (localWinners) { + if (localWinners && this.winners.length) { localWinners = JSON.parse(localWinners); this.winners = this.winners.map(winner => {