Swap CommonJS and AMD module check so that CommonJS is checked first. Fixes Webpack module bundling

This commit is contained in:
Marvin Hagemeister 2016-01-26 16:53:15 +01:00
parent 01bdcc2b01
commit 4fda65c862
2 changed files with 5 additions and 5 deletions

2
dist/plyr.js vendored

File diff suppressed because one or more lines are too long

View File

@ -11,12 +11,12 @@
'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') {
// 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);