Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upTypeError: result is undefined when using tasks #431
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
evancz
Sep 22, 2016
Member
I'm not sure if this problem still exists, but we should migrate it to an http://sscce.org that uses Elm 0.17.1 and the latest libraries.
|
I'm not sure if this problem still exists, but we should migrate it to an http://sscce.org that uses Elm 0.17.1 and the latest libraries. |
evancz
closed this
Sep 22, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
hoelzro commentedOct 28, 2015
I'm not sure if this belongs here or in evancs/elm-http, but from what I understand, I think this may be a general bug with tasks (if it's a bug at all).
I've been experimenting with Elm, and I wanted to create an example that sends requests to an HTTP server every click, but ignore clicks that happen when a request is in flight, so as to not overload the server or deal with requests that would involve stale data. I very well may be doing in wrong, but my example program results in the following JS error:
The line in question looks like this:
I should also mention that Elm keeps sending requests to the server even when I'm not clicking. The code I wrote to come across this bug is below; please also feel free to give me any feedback on how to write better Elm, as I am a newbie. =)
Test.elm:
app.psgi (a simple stupid Perl webserver that forwards everything but /square/ to elm-reactor; /square/ itself takes a number in the URL, squares that after sleeping a second, and outputs the result)