chore: minor code style tweak
This commit is contained in:
@ -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);
|
||||
|
@ -19,7 +19,7 @@ const supportsPassiveListeners = (() => {
|
||||
});
|
||||
window.addEventListener('test', null, options);
|
||||
window.removeEventListener('test', null, options);
|
||||
} catch (e) {
|
||||
} catch (_) {
|
||||
// Do nothing
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -51,7 +51,7 @@ const isUrl = (input) => {
|
||||
|
||||
try {
|
||||
return !isEmpty(new URL(string).hostname);
|
||||
} catch (e) {
|
||||
} catch (_) {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
@ -20,7 +20,7 @@ export function parseUrl(input, safe = true) {
|
||||
|
||||
try {
|
||||
return new URL(url);
|
||||
} catch (e) {
|
||||
} catch (_) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user