Default color val is null, stricter localWinners statement.
This commit is contained in:
@@ -127,10 +127,10 @@
|
|||||||
components: { TextToast, Wine, ScanToVinmonopolet },
|
components: { TextToast, Wine, ScanToVinmonopolet },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
red: 0,
|
red: null,
|
||||||
blue: 0,
|
blue: null,
|
||||||
green: 0,
|
green: null,
|
||||||
yellow: 0,
|
yellow: null,
|
||||||
payed: undefined,
|
payed: undefined,
|
||||||
winners: [],
|
winners: [],
|
||||||
wines: [],
|
wines: [],
|
||||||
@@ -310,7 +310,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
let localWinners = localStorage.getItem("winners");
|
let localWinners = localStorage.getItem("winners");
|
||||||
if (localWinners) {
|
if (localWinners && this.winners.length) {
|
||||||
localWinners = JSON.parse(localWinners);
|
localWinners = JSON.parse(localWinners);
|
||||||
|
|
||||||
this.winners = this.winners.map(winner => {
|
this.winners = this.winners.map(winner => {
|
||||||
|
|||||||
Reference in New Issue
Block a user