-
Notifications
You must be signed in to change notification settings - Fork 20
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
Uncaught Error Thrown in Routed Elmish Applications #30
Comments
Thanks for the report, looking into it.
|
Can you give 3.0.3 a spin?
|
Wow, that was fast! :) Sorry I took so long to get back to this. Also, Happy New year!
I wish I had got that in my initial report, but I am only using the hash parser right now, so I admittedly didn't think to try the path parser until now... :-\ |
Thanks, can you try 3.0.4 please?
|
That fixed it. |
Description
The Fable-Compiler v2.4.12 update changed the way Substring works. It now throws an error.
The parseHash method relies on the JS substring behavior that returns an empty string when the index is greater than the input string length. This error prevents routed, browser-based Elmish apps from loading when a base URL is used for the first request.
Repro code
Line 352 of parser.fs:
let hash = location.hash.Substring 1
Throws this error:
When the application is accessed without a hash segment in the URL (e.g. the root url)
Expected and actual results
Application successfully loads without error when requested using the root URL
Related information
The text was updated successfully, but these errors were encountered: