Skip to content

Commit

Permalink
Remove an unused error parameter.
Browse files Browse the repository at this point in the history
  • Loading branch information
lgarron committed May 17, 2024
1 parent 50c9ac0 commit 192f407
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/clipboard-polyfill/implementations/text.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ export function writeText(s: string): Promise<void> {
// Use the browser implementation if it exists.
if (originalNavigatorClipboardWriteText) {
debugLog("Using `navigator.clipboard.writeText()`.");
return originalNavigatorClipboardWriteText(s).catch((e) => {
writeTextStringFallbackPromise(s);
});
return originalNavigatorClipboardWriteText(s).catch(() =>
writeTextStringFallbackPromise(s),
);
}
return writeTextStringFallbackPromise(s);
}
Expand Down

0 comments on commit 192f407

Please sign in to comment.