Skip to content

Commit

Permalink
Hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
jozsi committed Jun 9, 2018
1 parent 3015fc0 commit 90c320d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-cosmos-wrapper-proxy",
"version": "1.2.0",
"version": "1.2.1",
"description": "Easily wrap components using react-cosmos",
"main": "lib/index.js",
"author": "Józsi <[email protected]>",
Expand Down
5 changes: 2 additions & 3 deletions src/__tests__/hoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,12 @@ describe("wrapped", () => {

describe("wrapped with parameters", () => {
const fixture = {
wrapMe: true
wrapMe: ["hello", "world"]
};
beforeAll(() => {
jest.clearAllMocks();
renderProxy(fixture, {
component: DoubleHOComponent,
hoc: ["hello", "world"]
component: DoubleHOComponent
});
});

Expand Down
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ export default ({ component: Component, props, fixtureKey, hoc }) =>
const fixtureEnabled = !!fixtureProps;
const NextComponent =
fixtureEnabled && hoc
? hoc[Symbol.iterator]
? Component(...hoc)(NextProxy)
? fixtureProps[Symbol.iterator]
? Component(...fixtureProps)(NextProxy)
: Component(NextProxy)
: NextProxy;
const nextProxyEl = <NextComponent {...nextProps} nextProxy={next()} />;
Expand Down

0 comments on commit 90c320d

Please sign in to comment.