Quellcode durchsuchen

fix typo/interesting bug

there are both `posts` and `model.posts`, but because we used `posts` (a
constant) in place of `model.posts` in the update function, we could
only every post one new post.
Lucas Stadler vor 11 Jahren
Ursprung
Commit
7f9c04db9a
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  1. 1 1
      elm/Stream.elm

+ 1 - 1
elm/Stream.elm

@ -66,7 +66,7 @@ update action model =
66 66
      AddPost _ -> { model |
67 67
                      isEditing <- False,
68 68
                      posts <- let p = model.newPost
69
                               in { p | created <- model.referenceDate } :: posts }
69
                               in { p | created <- model.referenceDate } :: model.posts }
70 70
71 71
      CancelPost -> { model | isEditing <- False, newPost <- Post.empty }
72 72