Skip to content

Commit

Permalink
fix format
Browse files Browse the repository at this point in the history
  • Loading branch information
bootjp committed Mar 30, 2022
1 parent 4d675a2 commit 89d2e33
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions send.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,13 @@
if (!document.activeElement) {
throw new Error("`document.activeElement` is null");
}
const activeElement = document.activeElement.appendChild(pasteTarget).parentNode;
const activeElement =
document.activeElement.appendChild(pasteTarget).parentNode;
pasteTarget.focus();
document.execCommand("Paste");
const paste = pasteTarget.innerText;
if (!activeElement) {
throw new Error("`activeElement` is null")
throw new Error("`activeElement` is null");
}
activeElement.removeChild(pasteTarget);
return paste;
Expand Down

0 comments on commit 89d2e33

Please sign in to comment.