Skip to content

Commit

Permalink
Fix SystemJS loading
Browse files Browse the repository at this point in the history
Fix SystemJS (and JSPM) loading by checking whether the empty `root` object (which is not falsy) contains `angular` before using that key.
  • Loading branch information
alsciende authored Jul 3, 2016
1 parent 83fab2d commit 18c91d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/angular-localForage.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(function(root, factory) {
'use strict';

var angular = root ? root.angular : window.angular;
var angular = (root && root.angular) || (window && window.angular);
if(typeof define === 'function' && define.amd) { // AMD
define(['localforage'], function(localforage) {
factory(angular, localforage);
Expand Down

0 comments on commit 18c91d2

Please sign in to comment.