From dcd6c15dc976408c712923af102a6a670a600b33 Mon Sep 17 00:00:00 2001 From: yflory Date: Mon, 29 Mar 2021 13:35:40 +0200 Subject: [PATCH] Fix type error with sheet templates --- www/common/onlyoffice/inner.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/www/common/onlyoffice/inner.js b/www/common/onlyoffice/inner.js index 300186fd0..f4b39defa 100644 --- a/www/common/onlyoffice/inner.js +++ b/www/common/onlyoffice/inner.js @@ -861,7 +861,7 @@ define([ var handleNewLocks = function (o, n) { var hasNew = false; // Check if we have at least one new lock - Object.keys(n).some(function (id) { + Object.keys(n || {}).some(function (id) { if (typeof(n[id]) !== "object") { return; } // Ignore old format // n[id] = { uid: lock, uid2: lock2 }; return Object.keys(n[id]).some(function (uid) { @@ -873,7 +873,7 @@ define([ }); }); // Remove old locks - Object.keys(o).forEach(function (id) { + Object.keys(o || {}).forEach(function (id) { if (typeof(o[id]) !== "object") { return; } // Ignore old format Object.keys(o[id]).forEach(function (uid) { // Removed lock