diff options
author | Sam Potts <me@sampotts.me> | 2016-02-13 22:19:31 +1100 |
---|---|---|
committer | Sam Potts <me@sampotts.me> | 2016-02-13 22:19:31 +1100 |
commit | aea86b6124d7f4ace27b0b5a05f6126bc0af58a1 (patch) | |
tree | 7f4f0564f15f0e228518bf836059b6cac09caeb0 /src | |
parent | ce513442699f4b3c964adf06d9baa49821351ce3 (diff) | |
parent | 89e000f669bfd42805ade8b81f5bdf4616c370c4 (diff) | |
download | plyr-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.js | 10 |
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*/ |