From 233a354b4728b5efc76d19a530ad85a3a3e2a3d2 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Fri, 11 Nov 2022 20:52:45 +0100 Subject: fixes and polyfills for quickjs --- packages/taler-wallet-core/src/util/timer.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'packages/taler-wallet-core/src/util/timer.ts') diff --git a/packages/taler-wallet-core/src/util/timer.ts b/packages/taler-wallet-core/src/util/timer.ts index 8ec1a25f8..d198e03c9 100644 --- a/packages/taler-wallet-core/src/util/timer.ts +++ b/packages/taler-wallet-core/src/util/timer.ts @@ -53,7 +53,7 @@ class IntervalHandle { * only event left. Has no effect in the browser. */ unref(): void { - if (typeof this.h === "object") { + if (typeof this.h === "object" && "unref" in this.h) { this.h.unref(); } } @@ -71,7 +71,7 @@ class TimeoutHandle { * only event left. Has no effect in the browser. */ unref(): void { - if (typeof this.h === "object") { + if (typeof this.h === "object" && "unref" in this.h) { this.h.unref(); } } -- cgit v1.2.3