Skip to content

Commit 4aa6518

Browse files
committed
Use umdjs convention to fix Require.js support.
1 parent 1da3bb7 commit 4aa6518

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

nprogress.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
/*! NProgress (c) 2013, Rico Sta. Cruz
22
* http://ricostacruz.com/nprogress */
33

4-
;(function(factory) {
4+
;(function(root, factory) {
55

6-
if (typeof module !== 'undefined' && module.exports) {
7-
module.exports = factory();
8-
} else if (typeof define === 'function' && define.amd) {
6+
if (typeof define === 'function' && define.amd) {
97
define(factory);
8+
} else if (typeof exports === 'object') {
9+
module.exports = factory();
1010
} else {
11-
this.NProgress = factory();
11+
root.NProgress = factory();
1212
}
1313

14-
})(function() {
14+
})(this, function() {
1515
var NProgress = {};
1616

1717
NProgress.version = '0.1.5';

0 commit comments

Comments
 (0)