From 60fa1ced209359b81098953724ba9f0e8f015bc5 Mon Sep 17 00:00:00 2001 From: stingl Date: Wed, 22 Sep 2021 15:31:06 +0200 Subject: [PATCH] validate bools --- js/app.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/js/app.js b/js/app.js index b7e191e..852398d 100644 --- a/js/app.js +++ b/js/app.js @@ -603,18 +603,24 @@ const TimeTrack = { }, timeBoxTimeLeft(ticket) { return Number(ticket.timeBoxMinutes - this.getTotalTime(ticket, true)); + }, + validateBooleans(value) { + return value === 'true' || value === true; } }, watch: { publicDB() { + this.publicDB = this.validateBooleans(this.publicDB) this.updateStorage(); this.$forceUpdate(); }, showPT() { + this.showPT = this.validateBooleans(this.showPT) this.updateStorage(); this.$forceUpdate(); }, dontShowMinutes() { + this.dontShowMinutes = this.validateBooleans(this.dontShowMinutes) this.updateStorage(); this.$forceUpdate(); }, @@ -623,6 +629,7 @@ const TimeTrack = { this.$forceUpdate(); }, fun() { + this.fun = this.validateBooleans(this.fun) this.updateStorage(); this.$forceUpdate(); }