zetkin / organize.zetk.in

Organizer front-end of the Zetkin system for organizing activism
21 stars 14 forks source link

TypeError: Cannot read property 'find' of null #1280

Open richardolsson opened 3 years ago

richardolsson commented 3 years ago

https://sentry.io/organizations/zetkin-foundation/issues/2422861822/?referrer=github_plugin

TypeError: Cannot read property 'find' of null
  File "/var/app/build/app/server/app.js", line 176, in orgIsValid
    let orgIsValid = orgId => !!state.user.memberships.find(m => m.organization.id == orgId);
  File "/var/app/build/app/server/app.js", line 186, in app.get
    if (orgIsValid(req.cookies.activeOrgId)) {
  File "/var/app/build/app/server/locale.js", line 69, in null.<anonymous>
    next();
  File "/var/app/build/app/server/datarouter.js", line 118, in Promise.all.then.catch
    Promise.all(promises).then(() => next()).catch(() => next());
...
(16 additional frame(s) were not displayed)

TypeError: Cannot read property 'find' of null