Prevents Node env from throwing an error

This commit is contained in:
Zeno Rocha 2017-02-28 09:57:36 -08:00
parent a00f1fe327
commit 9ddff7e591
2 changed files with 2 additions and 2 deletions

2
dist/clipboard.js vendored
View File

@ -10,7 +10,7 @@ var DOCUMENT_NODE_TYPE = 9;
/**
* A polyfill for Element.matches()
*/
if (Element && !Element.prototype.matches) {
if (typeof Element !== 'undefined' && !Element.prototype.matches) {
var proto = Element.prototype;
proto.matches = proto.matchesSelector ||

File diff suppressed because one or more lines are too long