diff --git a/src/clipboard-action.js b/src/clipboard-action.js index 21b05a8..ca228a7 100644 --- a/src/clipboard-action.js +++ b/src/clipboard-action.js @@ -140,8 +140,8 @@ class ClipboardAction { * Sets the `action` to be performed which can be either 'copy' or 'cut'. * @param {String} action */ - set action(action = 'copy') { - this._action = action; + set action(action) { + this._action = action || 'copy'; if (this._action !== 'copy' && this._action !== 'cut') { throw new Error('Invalid "action" value, use either "copy" or "cut"');