mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Fix lint errors
This commit is contained in:
parent
7d9acf30b6
commit
4730a30c3d
29 changed files with 53 additions and 23 deletions
|
@ -33,7 +33,7 @@ function textAreaCopy(text) {
|
|||
} else {
|
||||
ret = Promise.reject();
|
||||
}
|
||||
} catch (_) {
|
||||
} catch {
|
||||
ret = Promise.reject();
|
||||
}
|
||||
|
||||
|
@ -48,11 +48,10 @@ function textAreaCopy(text) {
|
|||
* @returns {Promise<void>} Promise.
|
||||
*/
|
||||
export function copy(text) {
|
||||
/* eslint-disable-next-line compat/compat */
|
||||
// eslint-disable-next-line sonarjs/different-types-comparison
|
||||
if (navigator.clipboard === undefined) {
|
||||
return textAreaCopy(text);
|
||||
} else {
|
||||
/* eslint-disable-next-line compat/compat */
|
||||
return navigator.clipboard.writeText(text).catch(() => {
|
||||
return textAreaCopy(text);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue