Skip to content

Commit b3efed6

Browse files
Kagamihara Nadeshikoaxmmisaka
authored andcommitted
Accomodate new linting rule; use valueOf for all enum members
1 parent 62f6a05 commit b3efed6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/core/time.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ export class TimeValue {
129129
let seconds = this.seconds + other.seconds;
130130
let nanoseconds = this.nanoseconds + other.nanoseconds;
131131

132-
if (nanoseconds >= TimeUnit.sec) {
132+
if (nanoseconds >= TimeUnit.sec.valueOf()) {
133133
// Carry the second.
134134
seconds += 1;
135135
nanoseconds -= TimeUnit.sec;
@@ -170,7 +170,7 @@ export class TimeValue {
170170
let seconds = this.seconds * factor;
171171
let nanoseconds = this.nanoseconds * factor;
172172

173-
if (nanoseconds >= TimeUnit.sec) {
173+
if (nanoseconds >= TimeUnit.sec.valueOf()) {
174174
// Carry seconds.
175175
const carry = Math.floor(nanoseconds / TimeUnit.sec);
176176
seconds += carry;

0 commit comments

Comments
 (0)