Skip to content

Commit fc0f847

Browse files
committed
Merge pull request #91 from tontonAurel/update/localforage
fix: webpack support
2 parents 233afbc + 249d2f2 commit fc0f847

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

dist/angular-localForage.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,15 @@
77
*/
88
(function(root, factory) {
99
'use strict';
10-
10+
var angular = root.angular || (window && window.angular);
1111
if(typeof define === 'function' && define.amd) { // AMD
1212
define(['localforage'], function(localforage) {
13-
factory(root.angular, localforage);
13+
factory(angular, localforage);
1414
});
1515
} else if(typeof exports === 'object' || typeof global === 'object') {
16-
var angular = root.angular || (window && window.angular);
1716
module.exports = factory(angular, require('localforage')); // Node/Browserify
1817
} else {
19-
return factory(root.angular, root.localforage); // Browser
18+
return factory(angular, root.localforage); // Browser
2019
}
2120
})(this, function(angular, localforage, undefined) {
2221
'use strict';
@@ -485,4 +484,3 @@
485484

486485
return angularLocalForage.name;
487486
});
488-

src/angular-localForage.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
(function(root, factory) {
22
'use strict';
33

4+
var angular = root.angular || (window && window.angular);
45
if(typeof define === 'function' && define.amd) { // AMD
56
define(['localforage'], function(localforage) {
6-
factory(root.angular, localforage);
7+
factory(angular, localforage);
78
});
89
} else if(typeof exports === 'object' || typeof global === 'object') {
9-
var angular = root.angular || (window && window.angular);
1010
module.exports = factory(angular, require('localforage')); // Node/Browserify
1111
} else {
12-
return factory(root.angular, root.localforage); // Browser
12+
return factory(angular, root.localforage); // Browser
1313
}
1414
})(this, function(angular, localforage, undefined) {
1515
'use strict';

0 commit comments

Comments
 (0)