From 259ae2d8cba5397723af4a61fc794ea5d3ba9c43 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',