Skip to content

Commit

Permalink
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/proxy/createClassProxy.js
Original file line number Diff line number Diff line change
@@ -219,7 +219,13 @@ function createClassProxy(InitialComponent, proxyKey, options = {}) {
} else if (isFunctionalComponent) {
result = CurrentComponent(this.props, this.context)
} else {
result = (CurrentComponent.prototype.render || this.render).apply(
const renderMethod = CurrentComponent.prototype.render || this.render
if (renderMethod === proxiedRender) {
throw new Error(
'React-Hot-Loader: you are trying to render Component without .render method',
)
}
result = renderMethod.apply(
this,
// eslint-disable-next-line prefer-rest-params
arguments,

0 comments on commit b6c1d9b

Please sign in to comment.