From e526a60bfdac7d8627ba8c0ba5db54a01a5aa75a Mon Sep 17 00:00:00 2001 From: buzzcode2007 <73412182+buzz-lightsnack-2007@users.noreply.github.com> Date: Fri, 11 Apr 2025 01:14:58 +0000 Subject: [PATCH] fix: Always convert duration to a number --- scripts/database/entry/activity.JS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/database/entry/activity.JS b/scripts/database/entry/activity.JS index b6cc58d..06ef6ae 100644 --- a/scripts/database/entry/activity.JS +++ b/scripts/database/entry/activity.JS @@ -15,6 +15,9 @@ class Activity extends Entry { // Set a default date value. this.date = this.date ? this.date : new Date(Date.now()); this.set_date(this.date); + + // Convert the duration to a number if it isn't. + (this.duration) ? this.duration = parseInt(this.duration) : null; }; /*