Skip to content

Commit

Permalink
fix client-side js crashing in webkit and firefox (#99)
Browse files Browse the repository at this point in the history
* fix client-side js crashing in webkit and firefox

* fix cookies error

* rm

* also fix in admin
  • Loading branch information
jgunnCO authored Oct 12, 2023
1 parent e8342eb commit 5bce0e8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion packages/admin/src/pages/_app.page.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ const MyApp = ({ Component, pageProps, cookies }) => {

MyApp.getInitialProps = async (appContext) => {
const appProps = await App.getInitialProps(appContext);
const cookies = appContext.ctx.req.cookies;
const cookies =
typeof window === 'undefined' ? {} : appContext.ctx.req.cookies;
return { ...appProps, cookies };
};

Expand Down
3 changes: 2 additions & 1 deletion packages/applicant/src/pages/_app.page.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ const MyApp = ({ Component, pageProps, cookies }) => {

MyApp.getInitialProps = async (appContext) => {
const appProps = await App.getInitialProps(appContext);
const cookies = appContext.ctx.req.cookies;
const cookies =
typeof window === 'undefined' ? {} : appContext.ctx.req.cookies;
return { ...appProps, cookies };
};

Expand Down
1 change: 1 addition & 0 deletions packages/gap-web-ui/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export default [
extract: true,
}),
],
external: ['depd'],
},
{
input: 'dist/esm/types/index.d.ts',
Expand Down

0 comments on commit 5bce0e8

Please sign in to comment.