aboutsummaryrefslogtreecommitdiffstats
path: root/src/js/plyr.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/js/plyr.js')
-rw-r--r--src/js/plyr.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/js/plyr.js b/src/js/plyr.js
index 6725478a..fce746db 100644
--- a/src/js/plyr.js
+++ b/src/js/plyr.js
@@ -11,17 +11,17 @@
'use strict';
/*global define,module*/
- if (typeof define === 'function' && define.amd) {
- // AMD
- define(null, function() { factory(root, document) });
- } else if (typeof module === 'object') {
+ if (typeof module === 'object' && typeof module.exports === 'object') {
// Node, CommonJS-like
module.exports = factory(root, document);
+ } else if (typeof define === 'function' && define.amd) {
+ // AMD
+ define(null, function() { factory(root, document) });
} else {
// Browser globals (root is window)
root.plyr = factory(root, document);
}
-}(this, function(window, document) {
+}(typeof window !== 'undefined' ? window : this, function(window, document) {
'use strict';
/*global YT,$f*/