Skip to content

Allow null return values for functions to-be-merged.#888

Closed
cpojer wants to merge 1 commit into
facebook:masterfrom
cpojer:getInitialState-mixin
Closed

Allow null return values for functions to-be-merged.#888
cpojer wants to merge 1 commit into
facebook:masterfrom
cpojer:getInitialState-mixin

Conversation

@cpojer
Copy link
Copy Markdown
Contributor

@cpojer cpojer commented Jan 14, 2014

This is a follow-up to #725 and fixes #883.

If a component and its mixin both define getInitialState and one of them returns null, we used to throw (was also covered by a test). This changes it not to throw for any functions that are merged through createMergedResultFunction. I'm not entirely sure if this will have unexpected side-effects but our tests seem to comply with the change.

@chenglou
Copy link
Copy Markdown
Contributor

👍

@cpojer cpojer closed this Jan 14, 2014
@cpojer cpojer deleted the getInitialState-mixin branch January 14, 2014 21:05
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.

problem with getInitialState returning null

2 participants