Skip to content

Commit

Permalink
fix: fix proxy adapter (#842)
Browse files Browse the repository at this point in the history
  • Loading branch information
theKashey authored and gregberge committed Feb 5, 2018
1 parent d29f484 commit 9bb8251
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/react-hot-loader/src/reconciler/proxyAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const renderReconciler = (target, force) => {
target[RENDERED_GENERATION] = currentGeneration
}

export const proxyWrapper = (target, element) => {
export const proxyWrapper = element => {
// post wrap on post render
if (!element) {
return element
Expand Down
4 changes: 2 additions & 2 deletions packages/react-hot-loader/test/reconciler.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,9 @@ describe('reconciler', () => {
)

const wrapper = mount(
//<AppContainer>
// <AppContainer> - ensure no AppContainer present
<App />,
//</AppContainer>,
// </AppContainer>,
)

expect(wrapper.html()).not.toContain('REPLACED')
Expand Down
4 changes: 2 additions & 2 deletions packages/react-stand-in/src/createClassProxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const proxies = new WeakMap()

const defaultRenderOptions = {
preRender: identity,
postRender: (target, result) => result,
postRender: result => result,
}

const defineClassMember = (Class, methodName, methodBody) =>
Expand Down Expand Up @@ -96,7 +96,7 @@ function createClassProxy(InitialComponent, proxyKey, options) {
result = CurrentComponent.prototype.render.call(this)
}

return renderOptions.postRender(this, result)
return renderOptions.postRender(result)
}

const defineProxyMethods = Proxy => {
Expand Down

0 comments on commit 9bb8251

Please sign in to comment.