diff --git a/packages/avet-server/lib/render.js b/packages/avet-server/lib/render.js index 252bdd8..58503f2 100644 --- a/packages/avet-server/lib/render.js +++ b/packages/avet-server/lib/render.js @@ -138,6 +138,8 @@ async function doRender( const _ctx = { ctx, asPath, + pathname: ctx.path, + query: ctx.query, err, }; diff --git a/packages/avet-utils/src/component.js b/packages/avet-utils/src/component.js index eeb20dd..1c44e44 100644 --- a/packages/avet-utils/src/component.js +++ b/packages/avet-utils/src/component.js @@ -5,7 +5,7 @@ function getDisplayName(Component) { async function loadGetInitialProps(Component, ctx) { if (!Component.getInitialProps) return {}; - const props = Component.getInitialProps(ctx); + const props = await Component.getInitialProps(ctx); if (!props && (!ctx.res || !ctx.res.finished)) { const compName = getDisplayName(Component); const message = `"${