From ea2ae2aa342d04f8681c8850e41640d3b5d0ac7b Mon Sep 17 00:00:00 2001 From: yflory Date: Fri, 3 Dec 2021 17:27:21 +0100 Subject: [PATCH] Fix type error when downloading drive root --- www/common/onlyoffice/inner.js | 20 +++++++++++--------- www/common/sframe-common-file.js | 2 +- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/www/common/onlyoffice/inner.js b/www/common/onlyoffice/inner.js index 3829de949..d3e34c8ce 100644 --- a/www/common/onlyoffice/inner.js +++ b/www/common/onlyoffice/inner.js @@ -1406,15 +1406,17 @@ define([ } break; case "cursor": - cursor.updateCursor({ - type: "cursor", - messages: [{ - cursor: obj.cursor, - time: +new Date(), - user: myUniqueOOId, - useridoriginal: myOOId - }] - }); + if (cursor && cursor.updateCursor) { + cursor.updateCursor({ + type: "cursor", + messages: [{ + cursor: obj.cursor, + time: +new Date(), + user: myUniqueOOId, + useridoriginal: myOOId + }] + }); + } break; case "getLock": handleLock(obj, send); diff --git a/www/common/sframe-common-file.js b/www/common/sframe-common-file.js index 582d41c59..f32a497b3 100644 --- a/www/common/sframe-common-file.js +++ b/www/common/sframe-common-file.js @@ -698,7 +698,7 @@ define([ var ctx = { fileHost: privateData.fileHost, get: common.getPad, - sframeChan: sframeChan, + sframeChan: common.getSframeChannel(), cache: common.getCache() };