mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
Fix patching component's render method in case its prototype is not writable (#1067)
This commit is contained in:
parent
1cd242ba57
commit
e38d81e6c1
|
@ -90,7 +90,7 @@ export default (handleError = () => {}) => {
|
||||||
function withWrapRenderAlways (fn, ...args) {
|
function withWrapRenderAlways (fn, ...args) {
|
||||||
const result = fn.apply(this, args)
|
const result = fn.apply(this, args)
|
||||||
if (this.render) {
|
if (this.render) {
|
||||||
this.render = wrapRender(this.render)
|
Object.defineProperty(this, 'render', { writable: true, value: wrapRender(this.render) })
|
||||||
}
|
}
|
||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue