Skip to content

Commit

Permalink
fix: resolve the loader with created elements
Browse files Browse the repository at this point in the history
  • Loading branch information
msak authored and ocombe committed Oct 13, 2016
1 parent 17c0885 commit 3351e44
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dist/modules/ocLazyLoad.loaders.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
el.onload = el['onreadystatechange'] = null;
loaded = 1;
$delegate._broadcast('ocLazyLoad.fileLoaded', path);
deferred.resolve();
deferred.resolve(el);
};
el.onerror = function () {
filesCache.remove(path);
Expand Down
4 changes: 2 additions & 2 deletions dist/ocLazyLoad.js
Original file line number Diff line number Diff line change
Expand Up @@ -866,7 +866,7 @@
el.onload = el['onreadystatechange'] = null;
loaded = 1;
$delegate._broadcast('ocLazyLoad.fileLoaded', path);
deferred.resolve();
deferred.resolve(el);
};
el.onerror = function () {
filesCache.remove(path);
Expand Down Expand Up @@ -1335,4 +1335,4 @@ if (!Array.prototype.indexOf) {
}
return -1;
};
}
}
2 changes: 1 addition & 1 deletion src/ocLazyLoad.loaders.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
el.onload = el['onreadystatechange'] = null;
loaded = 1;
$delegate._broadcast('ocLazyLoad.fileLoaded', path);
deferred.resolve();
deferred.resolve(el);
};
el.onerror = function() {
filesCache.remove(path);
Expand Down

0 comments on commit 3351e44

Please # to comment.