Skip to content

Clear dispatch token - #52

Merged
colbyr merged 3 commits into
masterfrom
clear-dispatch-token
Mar 6, 2017
Merged

colbyr merged 3 commits into
masterfrom
clear-dispatch-token

Conversation

@colbyr

@colbyr colbyr commented Mar 6, 2017 •

Copy link
Copy Markdown
Contributor

It seems that in certain versions of React it was possible for
componentWillMount to be called more than once. react/react#6613

If that happened to a connected component, it would cause
dispatcher.unregister to be called again with a token that was already
unregistered causing an exception.

This nulls the token field so unregister can only be called once for a
given token.

/cc @marcneuwirth

TODOs

  • linter, checker, and test are passing
  • any new public modules are exported from src/GeneralStore.js
  • version numbers are up to date in package.json and bower.json
  • CHANGELOG.md is up to date

Colby Rabideau added 3 commits March 6, 2017 11:54
It seems that in certain versions of React it was possible for
`componentWillMount` to be called more than once. react/react#6613

If that happened to a `connect`ed component, it would cause
`dispatcher.unregister` to be called again with a token that was already
unregistered causing an exception.

This `null`s the token field so unregister can only be called once for a
given token.
@colbyr
colbyr force-pushed the clear-dispatch-token branch from dcb0add to b1c2fc7 Compare March 6, 2017 16:54
@colbyr
colbyr merged commit 0736f80 into master Mar 6, 2017
@colbyr
colbyr deleted the clear-dispatch-token branch March 6, 2017 16:58
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