-
-
Notifications
You must be signed in to change notification settings - Fork 10.6k
ServerRouter transpiled incorrectly by Babel #3886
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
Comments
- workaround remix-run/react-router#3886
That's pretty wacky. Your fix isn't correct, as the location you need to be referencing comes from props. I believe it's the arrow function and the scoping is interacting oddly with the object destructuring. I wouldnt be surprised if renaming the local variable to loc would fix it. |
Same here, compiling the library directly seems to work fine. For those who are looking for a quick dirty fix (ServerRouter.js): var location = _props.location; // Add this line after "var context = _props.context;"
var rest = _objectWithoutProperties(_props, ['context', 'location']); // Add missing 'location' to the array |
I've locally packed and installed it with no problems. |
Sounds like a Babel bug? |
So any guess on when can we expect the next v4 npm build? :) |
v4.0.3 please! :-D |
@iammerrick We haven't released 4.0.0 yet, so why would we do 4.0.3? 😉 4.0.0-alpha.3 is out: https://github.com/ReactTraining/react-router/releases/tag/v4.0.0-alpha.3 |
Version
4.0.0
I got this error:
So I checked transpiled code:
Note
location
is retrieved from global state. Node.js does not have it.This is temp fix
The text was updated successfully, but these errors were encountered: