diff --git a/src/glkapi/glkapi.ts b/src/glkapi/glkapi.ts index 463d8c0..95783fb 100644 --- a/src/glkapi/glkapi.ts +++ b/src/glkapi/glkapi.ts @@ -248,7 +248,7 @@ export class AsyncGlk implements Interface.GlkApi { // Timer const timer = this.timer if (timer.last_interval !== timer.interval) { - state.timer = timer.interval || null + state.timer = timer.interval timer.last_interval = timer.interval } diff --git a/src/glkote/common/glkote.ts b/src/glkote/common/glkote.ts index 3734759..6da5405 100644 --- a/src/glkote/common/glkote.ts +++ b/src/glkote/common/glkote.ts @@ -296,7 +296,7 @@ export abstract class GlkOteBase implements GlkOte { } protected ontimer() { - if (!this.disabled) { + if (!this.disabled && this.timer) { this.send_event({type: 'timer'}) } }