fix: fix rax page-render missing context

This commit is contained in:
mark.ck 2021-04-23 16:16:49 +08:00
parent f84ec7e72e
commit d7de766c1f

View File

@ -27,7 +27,10 @@ export default function raxPageRendererFactory() {
return that.__renderContextConsumer(children); return that.__renderContextConsumer(children);
} }
return that.__renderContent(that.__renderContextProvider({ pageContext: that })); return that.__renderContent(that.__renderContextConsumer((context) => {
that.context = context;
return that.__renderContextProvider({ pageContext: that });
}));
} }
}; };
} }