Use optional catch binding.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2020-07-01 14:54:05 -07:00
parent b207ee57de
commit 9ceabe02d5
3 changed files with 4 additions and 4 deletions

View File

@@ -59,7 +59,7 @@ export class ClipboardDecrypterImpl implements ClipboardDecrypter {
plaintext = plaintext =
decipher.update(ciphertext, undefined, 'utf8') + decipher.update(ciphertext, undefined, 'utf8') +
decipher.final('utf8'); decipher.final('utf8');
} catch (_) { } catch {
// If the parsing or decryption failed in any way, // If the parsing or decryption failed in any way,
// the correct token hasnt been copied yet; try // the correct token hasnt been copied yet; try
// again next time. // again next time.

View File

@@ -627,7 +627,7 @@ class ServerManagerView {
try { try {
this.tabs[index].webview.canGoBackButton(); this.tabs[index].webview.canGoBackButton();
} catch (_) { } catch {
} }
this.activeTabIndex = index; this.activeTabIndex = index;
@@ -893,7 +893,7 @@ class ServerManagerView {
webviews.forEach(webview => { webviews.forEach(webview => {
try { try {
webview.setAudioMuted(state); webview.setAudioMuted(state);
} catch (_) { } catch {
// Webview is not ready yet // Webview is not ready yet
webview.addEventListener('dom-ready', () => { webview.addEventListener('dom-ready', () => {
webview.setAudioMuted(state); webview.setAudioMuted(state);

View File

@@ -10,7 +10,7 @@ export function getProxy(_uri: string): ProxyRule | void {
let uri; let uri;
try { try {
uri = new URL(_uri); uri = new URL(_uri);
} catch (_) { } catch {
return; return;
} }