fix: 🐛 Fix session erroring out when getting session from ferry (#2315)
This commit is contained in:
1 parent
3f238140b4
commit
f20723df37
1 file changed
+5
-5
@@ -12,6 +12,8 @@ export default class ScopesScopeProjectsSessionsSessionRoute extends Route {
|
||||
@service store;
|
||||
@service ipc;
|
||||
@service clientAgentSessions;
|
||||
@service flashMessages;
|
||||
@service intl;
|
||||
|
||||
// =methods
|
||||
|
||||
@@ -33,11 +35,9 @@ export default class ScopesScopeProjectsSessionsSessionRoute extends Route {
|
||||
try {
|
||||
const clientAgentSession =
|
||||
await this.clientAgentSessions.getClientAgentSession(session.id);
|
||||
if (clientAgentSession) {
|
||||
clientAgentSession.session_authorization.credentials.forEach((cred) =>
|
||||
session.addCredential(cred),
|
||||
);
|
||||
}
|
||||
clientAgentSession?.session_authorization?.credentials?.forEach(
|
||||
(cred) => session.addCredential(cred),
|
||||
);
|
||||
} catch (e) {
|
||||
// TODO: Log this error
|
||||
this.flashMessages.danger(
|
||||
|
||||
Reference in new issue
Block a user