Skip to content

Commit

Permalink
fix(esl-share): show copy notification just in case it is successful
Browse files Browse the repository at this point in the history
  • Loading branch information
ala-n committed Oct 20, 2023
1 parent 5923fe5 commit f57fe98
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/modules/esl-share/actions/copy-action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ export class ESLShareCopyAction extends ESLShareBaseAction {
}

/** Does an action to share */
public share($button: ESLShareButton): void {
public async share($button: ESLShareButton): Promise<void> {
const shareData = this.getShareData($button);
const {url} = shareData;
if (!this.isAvailable || !url) return;

navigator.clipboard.writeText(url);
await navigator.clipboard.writeText(url);
this.showCopyAlert($button.shareAdditional?.alertText);
}

Expand Down

0 comments on commit f57fe98

Please sign in to comment.