From 0f4013505d2707c226dc223df76ee700f6963a00 Mon Sep 17 00:00:00 2001 From: ansuz Date: Wed, 4 Nov 2020 12:26:53 +0530 Subject: [PATCH] prevent typeError for undefined button when logged out --- www/common/onlyoffice/inner.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/www/common/onlyoffice/inner.js b/www/common/onlyoffice/inner.js index ce0dbcc3f..28d06dd32 100644 --- a/www/common/onlyoffice/inner.js +++ b/www/common/onlyoffice/inner.js @@ -2070,7 +2070,9 @@ define([ // Import template var $template = common.createButton('importtemplate', true, {}, openTemplatePicker); - $template.appendTo(toolbar.$drawer); + if ($template && typeof($template.appendTo) === 'function') { + $template.appendTo(toolbar.$drawer); + } })(); }