From b3efed6a74ba1ea4e782eabd7642d68a6b43f2e1 Mon Sep 17 00:00:00 2001 From: Kagamihara Nadeshiko Date: Mon, 2 Oct 2023 15:23:49 -0700 Subject: [PATCH] Accomodate new linting rule; use valueOf for all enum members --- src/core/time.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/time.ts b/src/core/time.ts index 36c5a6407..bab7cf3c7 100644 --- a/src/core/time.ts +++ b/src/core/time.ts @@ -129,7 +129,7 @@ export class TimeValue { let seconds = this.seconds + other.seconds; let nanoseconds = this.nanoseconds + other.nanoseconds; - if (nanoseconds >= TimeUnit.sec) { + if (nanoseconds >= TimeUnit.sec.valueOf()) { // Carry the second. seconds += 1; nanoseconds -= TimeUnit.sec; @@ -170,7 +170,7 @@ export class TimeValue { let seconds = this.seconds * factor; let nanoseconds = this.nanoseconds * factor; - if (nanoseconds >= TimeUnit.sec) { + if (nanoseconds >= TimeUnit.sec.valueOf()) { // Carry seconds. const carry = Math.floor(nanoseconds / TimeUnit.sec); seconds += carry;