mirror of
https://github.com/zulip/zulip-desktop.git
synced 2025-11-02 21:13:32 +00:00
Use optional catch binding.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
@@ -59,7 +59,7 @@ export class ClipboardDecrypterImpl implements ClipboardDecrypter {
|
||||
plaintext =
|
||||
decipher.update(ciphertext, undefined, 'utf8') +
|
||||
decipher.final('utf8');
|
||||
} catch (_) {
|
||||
} catch {
|
||||
// If the parsing or decryption failed in any way,
|
||||
// the correct token hasn’t been copied yet; try
|
||||
// again next time.
|
||||
|
||||
@@ -627,7 +627,7 @@ class ServerManagerView {
|
||||
|
||||
try {
|
||||
this.tabs[index].webview.canGoBackButton();
|
||||
} catch (_) {
|
||||
} catch {
|
||||
}
|
||||
|
||||
this.activeTabIndex = index;
|
||||
@@ -893,7 +893,7 @@ class ServerManagerView {
|
||||
webviews.forEach(webview => {
|
||||
try {
|
||||
webview.setAudioMuted(state);
|
||||
} catch (_) {
|
||||
} catch {
|
||||
// Webview is not ready yet
|
||||
webview.addEventListener('dom-ready', () => {
|
||||
webview.setAudioMuted(state);
|
||||
|
||||
@@ -10,7 +10,7 @@ export function getProxy(_uri: string): ProxyRule | void {
|
||||
let uri;
|
||||
try {
|
||||
uri = new URL(_uri);
|
||||
} catch (_) {
|
||||
} catch {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user