diff options
| author | Andrej Mihajlov <and@mullvad.net> | 2019-02-28 18:43:06 +0100 |
|---|---|---|
| committer | Andrej Mihajlov <and@mullvad.net> | 2019-03-01 16:22:24 +0100 |
| commit | a229e8651d84da46ca4097948bfaa0a470565dd6 (patch) | |
| tree | 04e7f1f6dffd8b92444d4931a23177b54a11431e /gui/src/main | |
| parent | 159b9b8ba2be61f9b4468257ac77bc870a8ddba0 (diff) | |
| download | mullvadvpn-a229e8651d84da46ca4097948bfaa0a470565dd6.tar.xz mullvadvpn-a229e8651d84da46ca4097948bfaa0a470565dd6.zip | |
Use global.setTimeout to disambiguate from window.setTimeout
Diffstat (limited to 'gui/src/main')
| -rw-r--r-- | gui/src/main/index.ts | 4 | ||||
| -rw-r--r-- | gui/src/main/jsonrpc-client.ts | 2 | ||||
| -rw-r--r-- | gui/src/main/keyframe-animation.ts | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/gui/src/main/index.ts b/gui/src/main/index.ts index 860d847047..fb5f6efb54 100644 --- a/gui/src/main/index.ts +++ b/gui/src/main/index.ts @@ -560,7 +560,7 @@ class ApplicationMain { } }; - this.relaysInterval = setInterval(handler, RELAY_LIST_UPDATE_INTERVAL); + this.relaysInterval = global.setInterval(handler, RELAY_LIST_UPDATE_INTERVAL); } private stopRelaysPeriodicUpdates() { @@ -664,7 +664,7 @@ class ApplicationMain { const handler = () => { this.fetchLatestVersion(); }; - this.latestVersionInterval = setInterval(handler, VERSION_UPDATE_INTERVAL); + this.latestVersionInterval = global.setInterval(handler, VERSION_UPDATE_INTERVAL); } private stopLatestVersionPeriodicUpdates() { diff --git a/gui/src/main/jsonrpc-client.ts b/gui/src/main/jsonrpc-client.ts index 398cd075f7..67da72fab7 100644 --- a/gui/src/main/jsonrpc-client.ts +++ b/gui/src/main/jsonrpc-client.ts @@ -192,7 +192,7 @@ export default class JsonRpcClient<T> extends EventEmitter { const id = uuid.v4(); const payload = this.prepareParams(data); - const timerId = setTimeout(() => this.onTimeout(id), timeout); + const timerId = global.setTimeout(() => this.onTimeout(id), timeout); const message = jsonrpc.request(id, action, payload); this.unansweredRequests.set(id, { resolve, diff --git a/gui/src/main/keyframe-animation.ts b/gui/src/main/keyframe-animation.ts index 6e405c6ef7..25cd83a5db 100644 --- a/gui/src/main/keyframe-animation.ts +++ b/gui/src/main/keyframe-animation.ts @@ -83,7 +83,7 @@ export default class KeyframeAnimation { } private scheduleUpdate() { - this.timeout = setTimeout(() => this.onUpdateFrame(), this.speedValue); + this.timeout = global.setTimeout(() => this.onUpdateFrame(), this.speedValue); } private render() { |
