From 4e155448dbb4da3e23ce4fc9b7c87cbce7a728df Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Tue, 8 Mar 2022 10:36:41 -0800 Subject: [PATCH] Add additional debug session for nul sessions --- packages/webapp/src/classes/client/rest-client/index.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/webapp/src/classes/client/rest-client/index.ts b/packages/webapp/src/classes/client/rest-client/index.ts index eb7f7fa3..d68f75ae 100644 --- a/packages/webapp/src/classes/client/rest-client/index.ts +++ b/packages/webapp/src/classes/client/rest-client/index.ts @@ -615,8 +615,14 @@ export default class RestClient implements Client { if (this.persistenceManager) { return this.persistenceManager; } + let persistence: PersistenceManager; if (editorMode === 'edition-owner' || editorMode === 'edition-editor') { + + if (!global.lockSession) { + throw new Error(`Session could not be found: global.lockSession ${global.lockSession} - global.lockTimestamp: ${global.lockTimestamp} - ${global.mindmapLocked} - ${global.mindmapLockedMsg}`) + } + persistence = new RESTPersistenceManager({ documentUrl: '/c/restful/maps/{id}/document', revertUrl: '/c/restful/maps/{id}/history/latest',