Fix incorrect field reference to avoid confusion.

This commit is contained in:
Hitesh Jasani 2015-08-11 23:32:31 -04:00
parent 1dc5a98609
commit 3745e7605e

View file

@ -520,7 +520,7 @@ In the case of `RequestMore` first return the existing model. The user just clic
NewGif (Just "http://s3.amazonaws.com/giphygifs/media/ka1aeBvFCSLD2/giphy.gif")
```
It returns a `Maybe` because the request to the server may fail. That `Action` will get fed right back into our `update` function. So when we take the `NewGif` route we just update the current `image` if possible. If the request failed, we just stick with the current `model.image`.
It returns a `Maybe` because the request to the server may fail. That `Action` will get fed right back into our `update` function. So when we take the `NewGif` route we just update the current `gifUrl` if possible. If the request failed, we just stick with the current `model.gifUrl`.
We see the same kind of thing happening in `init` which defines the initial model and asks for a GIF in the correct topic from giphy.coms API.