mirror of
https://github.com/zenorocha/clipboard.js.git
synced 2023-08-10 21:12:48 +03:00
Update condition syntax based on PR reviews
This commit is contained in:
parent
a8c35683a6
commit
455b7fdb0c
@ -39,13 +39,12 @@ class ClipboardActionDefault {
|
||||
container: this.container,
|
||||
});
|
||||
} else if (this.target) {
|
||||
if (this.action === 'cut') {
|
||||
this.selectedText = ClipboardActionCut(this.target);
|
||||
} else if (this.action === 'copy') {
|
||||
this.selectedText = ClipboardActionCopy(this.target, {
|
||||
container: this.container,
|
||||
});
|
||||
}
|
||||
this.selectedText =
|
||||
this.action === 'cut'
|
||||
? ClipboardActionCut(this.target)
|
||||
: ClipboardActionCopy(this.target, {
|
||||
container: this.container,
|
||||
});
|
||||
}
|
||||
|
||||
this.handleResult(Boolean(this.selectedText));
|
||||
|
Loading…
x
Reference in New Issue
Block a user