From 30acafc1ec990dcdd68ec9fc1d968b01983da860 Mon Sep 17 00:00:00 2001 From: raphael Date: Wed, 6 May 2020 17:27:07 +0200 Subject: [PATCH] catch error on smallestScreenResolutions not set --- scripts/server-backend.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/server-backend.js b/scripts/server-backend.js index c0a33b8..6250068 100644 --- a/scripts/server-backend.js +++ b/scripts/server-backend.js @@ -231,7 +231,7 @@ function startBackendServer(port) { socket.on('updateScreenResolution', function (content) { content = escapeAllContentStrings(content); - if (accessToken === "" || accessToken == content["at"]) { + if (smallestScreenResolutions[whiteboardId] && (accessToken === "" || accessToken == content["at"])) { smallestScreenResolutions[whiteboardId][socket.id] = content["windowWidthHeight"] || { w: 10000, h: 10000 }; sendSmallestScreenResolution(); }