Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

common: allow using custom session id in tab session history

Abdullah Atta140e34328973
diff --git a/packages/common/src/utils/tab-session-history.ts b/packages/common/src/utils/tab-session-history.ts
index 4dd3c98a9..32db99164 100644
--- a/packages/common/src/utils/tab-session-history.ts
+++ b/packages/common/src/utils/tab-session-history.ts
@@ -77,8 +77,8 @@ export class TabSessionHistory {
});
}
- add(id: string) {
- const sessionId = getId();
+ add(id: string, sessionId?: string) {
+ sessionId = sessionId || getId();
const back_stack = this.getBackStack(id);
back_stack.push(sessionId);
this.setBackStack(id, back_stack);