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

Bug when using with require.js #16

Open
goette opened this issue Sep 2, 2014 · 3 comments
Open

Bug when using with require.js #16

goette opened this issue Sep 2, 2014 · 3 comments

Comments

@goette
Copy link

goette commented Sep 2, 2014

When using delorean with require.js - the preferred way of using flight.js - via

var Flux = require('delorean').Flux

I get Uncaught TypeError: undefined is not a function in delorean.js:105.

Thanks for help and thanks for the great job!

@f
Copy link
Owner

f commented Sep 2, 2014

Hello,

If you are using require.js, then you should use AMD way:

require('delorean.js', function (DeLorean) {
  var Flux = DeLorean.Flux;
  // ...
});

@goette
Copy link
Author

goette commented Sep 2, 2014

Hey thanks for your quick reply!

As I understand it both methods are equal, hence I get the same error when I use the AMD way as well..

Thanks!

@f
Copy link
Owner

f commented Sep 2, 2014

I'm going to test it and fix! :)

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

No branches or pull requests

2 participants