Skip to content

Commit

Permalink
fix(react): do not throw error when no options are passed
Browse files Browse the repository at this point in the history
Currently, if you do not pass any options, the following error is thrown:

`TypeError: Cannot read property extensions of undefined`
This commit makes options an object by default, preventing the error
  • Loading branch information
robin-drexler authored and ZauberNerd committed Mar 28, 2018
1 parent 5000667 commit e5bffdd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/react/lib/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ exports.createCombinedContext = function(
ReactContext,
combineContexts
) {
config = config || {};
var mergedConfig = Object.assign({}, config);
delete mergedConfig.extensions;
var mergedContexts = [ReactContext];
Expand Down

0 comments on commit e5bffdd

Please sign in to comment.