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,
|
container: this.container,
|
||||||
});
|
});
|
||||||
} else if (this.target) {
|
} else if (this.target) {
|
||||||
if (this.action === 'cut') {
|
this.selectedText =
|
||||||
this.selectedText = ClipboardActionCut(this.target);
|
this.action === 'cut'
|
||||||
} else if (this.action === 'copy') {
|
? ClipboardActionCut(this.target)
|
||||||
this.selectedText = ClipboardActionCopy(this.target, {
|
: ClipboardActionCopy(this.target, {
|
||||||
container: this.container,
|
container: this.container,
|
||||||
});
|
});
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.handleResult(Boolean(this.selectedText));
|
this.handleResult(Boolean(this.selectedText));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user