From b2b13c297cb77cb9ae98a305c978d9914f9d8d5e Mon Sep 17 00:00:00 2001 From: Stian Aune Date: Thu, 7 Nov 2019 20:57:31 +0100 Subject: [PATCH] Safe calorie diff. --- contentScript.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/contentScript.js b/contentScript.js index ee1dbfa..14fc67f 100644 --- a/contentScript.js +++ b/contentScript.js @@ -373,6 +373,10 @@ if (typeof Overlay === "undefined") { } calorieDiff() { + if (this.workoutStatus == null) { + return 0; + } + const {minutes, seconds, calories} = this.workoutStatus; const expected = this.expectedCalories(minutes, seconds);