1
0
Fork 0
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:
ǝlzlǝoq lǝᴉuɐp ツ 2017-02-12 17:44:54 +01:00 committed by Arunoda Susiripala
parent 1cd242ba57
commit e38d81e6c1

View file

@ -90,7 +90,7 @@ export default (handleError = () => {}) => {
function withWrapRenderAlways (fn, ...args) {
const result = fn.apply(this, args)
if (this.render) {
this.render = wrapRender(this.render)
Object.defineProperty(this, 'render', { writable: true, value: wrapRender(this.render) })
}
return result
}