Skip to content

Commit

Permalink
fix: the config/run blocks were not invoked without reconfig: true
Browse files Browse the repository at this point in the history
Fixes #5
  • Loading branch information
ocombe committed Aug 26, 2014
1 parent bcbca81 commit 300882a
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions dist/ocLazyLoad.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
el, loaded,
cacheBuster = function cacheBuster(url) {
var dc = new Date().getTime();
if(url.indexOf('?') != -1) {
if(url.indexOf('?') >= 0) {
if(url.substring(0, url.length - 1) === '&') {
return url + '_dc=' + dc;
}
Expand Down Expand Up @@ -655,8 +655,8 @@
throw new Error('unsupported provider ' + args[0]);
}
var invoked = regConfigs.indexOf(moduleName);
if(registerInvokeList(args[2][0]) && (args[1] !== 'invoke' || (args[1] === 'invoke' && (!invoked || reconfig)))) {
if(!invoked) {
if(registerInvokeList(args[2][0]) && (args[1] !== 'invoke' || (args[1] === 'invoke' && (invoked === -1 || reconfig)))) {
if(invoked === -1) {
regConfigs.push(moduleName);
}
provider[args[1]].apply(provider, args[2]);
Expand Down
2 changes: 1 addition & 1 deletion dist/ocLazyLoad.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 300882a

Please sign in to comment.