refactor: use optional catch binding (#39232)

This commit is contained in:
Milan Burda 2023-07-27 16:53:45 +02:00 committed by GitHub
parent 8dea783805
commit c9bae5da8e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 17 additions and 17 deletions

View file

@ -32,7 +32,7 @@ ifdescribe(!process.mas)('autoUpdater module', function () {
const url = 'http://electronjs.org';
try {
(autoUpdater.setFeedURL as any)(url, { header: 'val' });
} catch (err) { /* ignore */ }
} catch { /* ignore */ }
expect(autoUpdater.getFeedURL()).to.equal(url);
});
@ -44,7 +44,7 @@ ifdescribe(!process.mas)('autoUpdater module', function () {
const url = 'http://mymagicurl.local';
try {
autoUpdater.setFeedURL({ url });
} catch (err) { /* ignore */ }
} catch { /* ignore */ }
expect(autoUpdater.getFeedURL()).to.equal(url);
});