refactor: Add conditional chaining to session-manager call

This commit is contained in:
Susmitha Girumala committed 2021-05-14 15:08:06 -04:00
1 parent aab980a7dc
commit f2f5a46cdf
2 files changed
+2 -2

No files matched your search

@@ -31,7 +31,7 @@ class SessionManager {
*/
stopById(session_id) {
const session = this.#sessions.find((session) => session.id === session_id);
return session && session.stop();
return session?.stop?.();
}
stopAll() {