Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix proxy adapter #842

Merged
merged 1 commit into from
Feb 5, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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