Skip to content

Commit ec1a456

Browse files
authored
Fixes getInitialProps not being called in the App
#59
1 parent 95f6e1a commit ec1a456

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/hoc/withPasswordProtect.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,14 @@ export const withPasswordProtect = (
7474
/>
7575
);
7676
};
77+
78+
ProtectedApp.getInitialProps = async (ctx: NextPageContext) => {
79+
if (App.getInitialProps) {
80+
return App.getInitialProps(ctx);
81+
}
82+
83+
return {};
84+
};
7785

7886
return ProtectedApp;
7987
};

0 commit comments

Comments
 (0)