mirror of
https://github.com/zenorocha/clipboard.js.git
synced 2023-08-10 21:12:48 +03:00
Fixes tests
This commit is contained in:
@ -14,6 +14,10 @@ class Clipboard extends Emitter {
|
||||
constructor(selector) {
|
||||
super();
|
||||
|
||||
if (!document.querySelectorAll(selector).length) {
|
||||
throw new Error('No matches were found for the provided selector');
|
||||
}
|
||||
|
||||
delegate.bind(document.body, selector, 'click', (e) => this.initialize(e));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user