Allows Text Option to be Specified as a string

See #201 for full issue
This commit is contained in:
Jack Lukic 2016-03-07 15:05:43 -05:00
parent 07a1f8456b
commit eb7beddb4c

View File

@ -26,7 +26,7 @@ class Clipboard extends Emitter {
resolveOptions(options = {}) {
this.action = (typeof options.action === 'function') ? options.action : this.defaultAction;
this.target = (typeof options.target === 'function') ? options.target : this.defaultTarget;
this.text = (typeof options.text === 'function') ? options.text : this.defaultText;
this.text = (typeof options.text === 'function') ? options.text : options.text || this.defaultText;
}
/**