chore: minor code style tweak

This commit is contained in:
Sam Potts
2021-09-29 21:44:15 +10:00
parent fbf4d27cd4
commit 5d1d247491
10 changed files with 14 additions and 14 deletions

View File

@ -31,7 +31,7 @@ export function repaint(element, delay) {
// eslint-disable-next-line no-param-reassign
element.hidden = false;
} catch (e) {
} catch (_) {
// Do nothing
}
}, delay);

View File

@ -19,7 +19,7 @@ const supportsPassiveListeners = (() => {
});
window.addEventListener('test', null, options);
window.removeEventListener('test', null, options);
} catch (e) {
} catch (_) {
// Do nothing
}

View File

@ -17,7 +17,7 @@ export default function fetch(url, responseType = 'text') {
if (responseType === 'text') {
try {
resolve(JSON.parse(request.responseText));
} catch (e) {
} catch (_) {
resolve(request.responseText);
}
} else {
@ -35,8 +35,8 @@ export default function fetch(url, responseType = 'text') {
request.responseType = responseType;
request.send();
} catch (e) {
reject(e);
} catch (error) {
reject(error);
}
});
}

View File

@ -51,7 +51,7 @@ const isUrl = (input) => {
try {
return !isEmpty(new URL(string).hostname);
} catch (e) {
} catch (_) {
return false;
}
};

View File

@ -20,7 +20,7 @@ export function parseUrl(input, safe = true) {
try {
return new URL(url);
} catch (e) {
} catch (_) {
return null;
}
}