Skip to content

Conversation

@sparksp
Copy link

@sparksp sparksp commented Jul 17, 2020

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

Standard complained about this.
@netlify
Copy link

netlify bot commented Jul 17, 2020

Deploy request for elm-live pending review.

Review with commit f45765d

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

@sparksp sparksp force-pushed the fix-dispose-callback branch 2 times, most recently from 15a8b8a to c48f712 Compare July 17, 2020 10:00
sparksp added 2 commits July 17, 2020 11:08
I was seeing console errors due to a null `myDisposeCallback`. No where
seems to be setting it, but `module.hot.apply` is still called. There
should probably be some type checks that the callback is callable, but
to keep the code clean I have provided a simple noop callback instead.
@sparksp sparksp force-pushed the fix-dispose-callback branch from c48f712 to f45765d Compare July 17, 2020 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant