Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple modules load error #35

Closed
mort3za opened this issue Jun 29, 2014 · 11 comments
Closed

Multiple modules load error #35

mort3za opened this issue Jun 29, 2014 · 11 comments

Comments

@mort3za
Copy link

mort3za commented Jun 29, 2014

In version 0.2.0 calling this works good:

$ocLazyLoad.load([
  {name: 'module_name1', files: ['path/to/module1.js']},
  {name: 'module_name2', files: ['path/to/module2.js']},
]);

but in latest version throws exception. i use angular.js 1.2.14

@TimNZ
Copy link

TimNZ commented Jun 30, 2014

+1, broken in 0.3.0

@ocombe
Copy link
Owner

ocombe commented Jun 30, 2014

Ok, do you have the message of the exception ?
Do you use the internal js loader, requirejs or script.js ?
Are module1 and module2 independant or do one of them require the other one ?

@mort3za
Copy link
Author

mort3za commented Jun 30, 2014

unfortunately i can't see that situation again and i didn't saved it but i am sure changing plugin file was source of error.
error was something like module undefined is not available... seemed it was related to name of modules.

@TimNZ
Copy link

TimNZ commented Jun 30, 2014

In my case I simply replaced 0.2.0 with 0.3.0 and it started failing.

Since I'm on a time crunch with a project I reverted to 0.2.0, and since 0.2.0 works I don't have a compelling reason to actually upgrade to 0.3.0, I'll have another look after release in a week or so.

@ocombe
Copy link
Owner

ocombe commented Jun 30, 2014

Ok thanks !

@ocombe ocombe added bug labels Jul 3, 2014
@ocombe
Copy link
Owner

ocombe commented Jul 14, 2014

You should check if it was the same bug as #33 fixed in release 0.3.1

@TimNZ
Copy link

TimNZ commented Jul 14, 2014

Still broken.

The files are being loaded but do not appear to be evaluated/executed properly.

Still in the middle of prep for release so won't look at it again till at least next week, thankfully 0.2.0 works fine.

@ocombe
Copy link
Owner

ocombe commented Jul 14, 2014

Damn :-(

@taz
Copy link
Contributor

taz commented Jul 22, 2014

I've spent a bit of time looking at this and the only place I could reproduce any sort of error was using IE in ie8 emulation mode, where it kicked up a stink about the trailing comma in the original post.

I'm sceptical as to whether that's the actual problem though or just an issue with the example given. It didn't occur in 0.2.0 though, only 0.3.0, so you never know!

Either way, I've put in a quick fix to handle when the module being passed to the loader is undefined or null. I'm still testing a couple of other bits, then I'll issue a PR.

@ocombe
Copy link
Owner

ocombe commented Jul 22, 2014

Awesome, thanks ! Take your time, we're all doing this for the community. Thanks again for your help.

@ocombe
Copy link
Owner

ocombe commented Jul 22, 2014

@TimNZ & @mort3za can you try the current master (it's not a release yet) and see if the PR from @BenBlazely fixes your problems ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants