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

set state to blank object on destroy, not null #1365

Merged
merged 2 commits into from
Apr 22, 2018
Merged

set state to blank object on destroy, not null #1365

merged 2 commits into from
Apr 22, 2018

Conversation

Rich-Harris
Copy link
Member

fixes #1354. This makes sense in v2 since we're encouraging widespread use of destructuring.

@Conduitry
Copy link
Member

Re: my comment on #1354 - is there a different good way of determining whether a component has been deleted?

@Rich-Harris
Copy link
Member Author

Internally we can check for the existence of this._fragment. We toyed with the idea of adding a component.destroyed property that would become true on destroy(), but weren't sure if people actually needed it.

@codecov-io
Copy link

codecov-io commented Apr 22, 2018

Codecov Report

Merging #1365 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1365   +/-   ##
=======================================
  Coverage   91.49%   91.49%           
=======================================
  Files         126      126           
  Lines        4468     4468           
  Branches     1383     1383           
=======================================
  Hits         4088     4088           
  Misses        154      154           
  Partials      226      226

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a78f37d...fd7aced. Read the comment docs.

@Rich-Harris Rich-Harris merged commit 4734382 into master Apr 22, 2018
@Rich-Harris Rich-Harris deleted the gh-1354 branch April 22, 2018 18: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.

component.get() can return undefined after component destroyed
3 participants