Skip to content

Commit 2c6190f

Browse files
committed
Merge pull request #92 from kaidjohnson/master
Switch order of module pattern checks for more consistent UMD.
2 parents 503ddcf + 9b35f29 commit 2c6190f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/loglevel.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
*/
77
(function (root, definition) {
88
"use strict";
9-
if (typeof module === 'object' && module.exports && typeof require === 'function') {
10-
module.exports = definition();
11-
} else if (typeof define === 'function' && typeof define.amd === 'object') {
9+
if (typeof define === 'function' && define.amd) {
1210
define(definition);
11+
} else if (typeof module === 'object' && module.exports) {
12+
module.exports = definition();
1313
} else {
1414
root.log = definition();
1515
}

0 commit comments

Comments
 (0)