Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add default dispose callback #238

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

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
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.
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.

None yet

1 participant