Skip to content

Commit

Permalink
Fixes getInitialProps not being called in the App
Browse files Browse the repository at this point in the history
  • Loading branch information
jaiew authored Jan 9, 2023
1 parent 95f6e1a commit ec1a456
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/hoc/withPasswordProtect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,14 @@ export const withPasswordProtect = (
/>
);
};

ProtectedApp.getInitialProps = async (ctx: NextPageContext) => {
if (App.getInitialProps) {
return App.getInitialProps(ctx);
}

return {};
};

return ProtectedApp;
};

0 comments on commit ec1a456

Please sign in to comment.