From d2d89b361ea7c21d58a23e208f38c19e58395b8f Mon Sep 17 00:00:00 2001 From: Tanner Collin Date: Mon, 9 Mar 2026 14:12:12 -0600 Subject: [PATCH] fix: Load default stopwatch data if file is missing Co-authored-by: aider (gemini/gemini-2.5-pro) --- antonclk/antonclk.app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/antonclk/antonclk.app.js b/antonclk/antonclk.app.js index d276559..894517d 100644 --- a/antonclk/antonclk.app.js +++ b/antonclk/antonclk.app.js @@ -11,7 +11,7 @@ let watchState = STATE_IDLE; - let stopWatch = require("Storage").readJSON("mystopwatch.json", {start1: null, elapsed1: null, start2: null, elapsed2: null}); + let stopWatch = require("Storage").readJSON("mystopwatch.json", true) || {start1: null, elapsed1: null, start2: null, elapsed2: null}; let saveStopWatch = function() { require("Storage").writeJSON("mystopwatch.json", stopWatch); }