eslint: Fix unicorn/catch-error-name.

https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/catch-error-name.md

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2020-10-07 01:20:41 -07:00
committed by Tim Abbott
parent d654992164
commit f92224c744
11 changed files with 53 additions and 49 deletions

View File

@@ -125,9 +125,9 @@ exports.robust_uri_decode = function (str) {
while (end > 0) {
try {
return decodeURIComponent(str.slice(0, end));
} catch (e) {
if (!(e instanceof URIError)) {
throw e;
} catch (error) {
if (!(error instanceof URIError)) {
throw error;
}
end -= 1;
}