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); + } })(); }