diff --git a/package.json b/package.json index dd665c1..3f5253f 100644 --- a/package.json +++ b/package.json @@ -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 ", diff --git a/src/__tests__/hoc.js b/src/__tests__/hoc.js index a840b97..0c8cbeb 100644 --- a/src/__tests__/hoc.js +++ b/src/__tests__/hoc.js @@ -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 }); }); diff --git a/src/index.js b/src/index.js index de002a6..e37b98d 100644 --- a/src/index.js +++ b/src/index.js @@ -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 = ;