From 970414d79b08c392e6b4db380156e32a627441ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20=C5=A0ediv=C3=BD?= Date: Wed, 1 Sep 2021 19:11:01 +0200 Subject: [PATCH] catch error type any. --- src/component/internal/webrtc.ts | 4 ++-- src/component/internal/websocket.ts | 2 +- src/component/main.vue | 4 ++-- src/component/screencast.vue | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/component/internal/webrtc.ts b/src/component/internal/webrtc.ts index 4f9a14c8..ea005d69 100644 --- a/src/component/internal/webrtc.ts +++ b/src/component/internal/webrtc.ts @@ -181,7 +181,7 @@ export class NekoWebRTC extends EventEmitter { try { this._channel.close() - } catch (err) {} + } catch {} this._channel = undefined } @@ -197,7 +197,7 @@ export class NekoWebRTC extends EventEmitter { try { this._peer.close() - } catch (err) {} + } catch {} this._peer = undefined } diff --git a/src/component/internal/websocket.ts b/src/component/internal/websocket.ts index 03301c51..c7f7f065 100644 --- a/src/component/internal/websocket.ts +++ b/src/component/internal/websocket.ts @@ -59,7 +59,7 @@ export class NekoWebSocket extends EventEmitter { try { this._ws.close() - } catch (err) {} + } catch {} this._ws = undefined } diff --git a/src/component/main.vue b/src/component/main.vue index 80a55b73..5904fff2 100644 --- a/src/component/main.vue +++ b/src/component/main.vue @@ -208,7 +208,7 @@ try { this.disconnect() - } catch (e) {} + } catch {} if (this.state.authenticated) { Vue.set(this.state, 'authenticated', false) @@ -264,7 +264,7 @@ try { this.disconnect() - } catch (e) {} + } catch {} try { await this.api.session.logout() diff --git a/src/component/screencast.vue b/src/component/screencast.vue index 5a0e93a7..e53215a6 100644 --- a/src/component/screencast.vue +++ b/src/component/screencast.vue @@ -44,7 +44,7 @@ } URL.revokeObjectURL(image) - } catch (e) { + } catch { await new Promise((res) => setTimeout(res, ERROR_DELAY_MS)) } }