aurelia / http-client

A simple, restful, message-based wrapper around XMLHttpRequest.
MIT License
62 stars 59 forks source link

Possible bug on http-client 0.10.1 #75

Closed dpinart closed 9 years ago

dpinart commented 9 years ago

I just upgraded to latest aurelia version. Since then, I'm getting a funky error at aurelia-http-client.js that prevents app to start.

The error text is "Super expression must either be null or a function, not undefined" and it's produced at line 359 of the http-client.js file.

Watchin the file I can see that there's a JSONPRequestMessage class at line 347 that inherits from RequestMessage, defined below in the same file at line 605. It seems that error is due because JSONPRequestMessage is defined earlier in the file than RequestMessage class. Moving RequestMessgae above in the file seems to fix the issue. Meanwhile I'm using version 0.10.0

EisenbergEffect commented 9 years ago

@bryanrsmith Can you investigate? Let me know and I can get a patch out.

jdanyow commented 9 years ago

Someone in the gitter confirmed swapping the order of the classes in the built/concatenated js fixed the issue. Maybe swapping these lines will fix the build:

https://github.com/aurelia/http-client/blob/master/build/tasks/build.js#L22 https://github.com/aurelia/http-client/blob/master/build/tasks/build.js#L25

EisenbergEffect commented 9 years ago

Pushed out a fix to the build in version 0.10.2.