Skip to content

Instantly share code, notes, and snippets.

@gdotdesign
Created April 28, 2016 13:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gdotdesign/6b79605e7f4e495e19f77930f61103e1 to your computer and use it in GitHub Desktop.
Save gdotdesign/6b79605e7f4e495e19f77930f61103e1 to your computer and use it in GitHub Desktop.
Elm 0.17 - Lazy error
149lazy_test.elm:6939 Uncaught Error: Ran into an unknown patch!
applyPatch @ lazy_test.elm:6939
applyPatches @ lazy_test.elm:6889
updateIfNeeded @ lazy_test.elm:6277
Also run into this error with lazy, couldn't reproduce it just yet.
Uncaught TypeError: Cannot read property 'index' of undefined
addDomNodesHelp @ main.js:7314
addDomNodes @ main.js:7306
addDomNodesHelp @ main.js:7322
addDomNodesHelp @ main.js:7353
addDomNodesHelp @ main.js:7353
addDomNodesHelp @ main.js:7353
addDomNodesHelp @ main.js:7353
addDomNodesHelp @ main.js:7353
addDomNodesHelp @ main.js:7353
addDomNodes @ main.js:7306
applyPatches @ main.js:7381
updateIfNeeded @ main.js:6775
import Html exposing (node, div, text)
import Html.App
import Html.Lazy
import Time
type Msg
= UpdateTime Float
type alias Model =
{ time : Float }
update : Msg -> Model -> (Model, Cmd Msg)
update msg model =
case msg of
UpdateTime time ->
({ model | time = time }, Cmd.none)
view : Model -> Html.Html Msg
view model =
node "test" [] [text (toString model.time)]
main =
Html.App.program
{ init = ({ time = 0}, Cmd.none)
, update = update
, view = Html.Lazy.lazy view
, subscriptions = \_ -> Time.every 100 UpdateTime
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment