elm-live icon indicating copy to clipboard operation
elm-live copied to clipboard

Add default dispose callback

Open sparksp opened this issue 4 years ago • 1 comments

I was seeing console errors due to a null myDisposeCallback. Nowhere seems to be calling module.hot.dispose but module.hot.apply is still called. There should probably be some type check that the callback is callable but to keep the code clean I have provided a simple noop callback instead.

Here's the config that was failing for me:

elm-live resources/elm/Main.elm \
    --hot --dir=public --start-page=index.html \
    --proxy-prefix=/api --proxy-host=http://localhost:8088/api \
    -- --output=public/js/main.js --debug

sparksp avatar Jul 17 '20 09:07 sparksp

Deploy request for elm-live pending review.

Review with commit f45765dc100b89a83902bab0301502667148afb4

https://app.netlify.com/sites/elm-live/deploys

netlify[bot] avatar Jul 17 '20 09:07 netlify[bot]