aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSam Potts <me@sampotts.me>2016-02-13 22:19:31 +1100
committerSam Potts <me@sampotts.me>2016-02-13 22:19:31 +1100
commitaea86b6124d7f4ace27b0b5a05f6126bc0af58a1 (patch)
tree7f4f0564f15f0e228518bf836059b6cac09caeb0 /src
parentce513442699f4b3c964adf06d9baa49821351ce3 (diff)
parent89e000f669bfd42805ade8b81f5bdf4616c370c4 (diff)
downloadplyr-aea86b6124d7f4ace27b0b5a05f6126bc0af58a1.tar.lz
plyr-aea86b6124d7f4ace27b0b5a05f6126bc0af58a1.tar.xz
plyr-aea86b6124d7f4ace27b0b5a05f6126bc0af58a1.zip
Merge branch 'master' of github.com:selz/plyr
# Conflicts: # dist/plyr.js
Diffstat (limited to 'src')
-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*/