Skip to content

Commit

Permalink
Minor improve in _app.js
Browse files Browse the repository at this point in the history
  • Loading branch information
jirik committed Dec 18, 2024
1 parent 9c1b6a5 commit 3c8e4d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pages/_app.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class MyApp extends App {
const num_authn_providers = Object.keys(providers).length;
pageProps.num_authn_providers = num_authn_providers;
}
if (ctx.req && ctx.req.session && ctx.req.session.passport && ctx.req.session.passport.user) {
if (ctx?.req?.session?.passport?.user) {
const user_util = require('../src/authn/user').default;
const authn_util = require('../src/authn/util').default;
await authn_util.refresh_authn_info_if_needed(ctx.req);
Expand Down

0 comments on commit 3c8e4d2

Please sign in to comment.