[Libreoffice-commits] online.git: loleaflet/src
Henry Castro (via logerrit)
logerrit at kemper.freedesktop.org
Fri Oct 25 19:49:07 UTC 2019
loleaflet/src/control/Control.Toolbar.js | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
New commits:
commit 6eb1c759a8fd54e1a191c25743d7f7e5ce172f54
Author: Henry Castro <hcastro at collabora.com>
AuthorDate: Fri Oct 25 15:44:37 2019 -0400
Commit: Henry Castro <hcastro at collabora.com>
CommitDate: Fri Oct 25 21:48:49 2019 +0200
loleaflet: fix "TypeError: Cannot read property 'show' of undefined"
I have the following error in the console log:
Control.Toolbar.js:1541 Uncaught TypeError: Cannot read property 'show'
of undefined
at NewClass.onDocLayerInit (Control.Toolbar.js:1541)
at NewClass.fire (Events.js:146)
at NewClass._onStatusMsg (Socket.js:886)
at NewClass._onMessage (Socket.js:777)
Change-Id: I83f07bd5bfcfde484156c2719065f4418f6fd4b3
Reviewed-on: https://gerrit.libreoffice.org/81534
Reviewed-by: Henry Castro <hcastro at collabora.com>
Tested-by: Henry Castro <hcastro at collabora.com>
diff --git a/loleaflet/src/control/Control.Toolbar.js b/loleaflet/src/control/Control.Toolbar.js
index 4fc5bdb09..cd2dd2da6 100644
--- a/loleaflet/src/control/Control.Toolbar.js
+++ b/loleaflet/src/control/Control.Toolbar.js
@@ -1538,7 +1538,10 @@ function onDocLayerInit() {
break;
case 'presentation':
- toolbarUp.show('breaksidebar', 'sidebar');
+ if (toolbarUp) {
+ toolbarUp.show('breaksidebar', 'sidebar');
+ }
+
var presentationToolbar = w2ui['presentation-toolbar'];
if (!map['wopi'].HideExportOption && presentationToolbar) {
presentationToolbar.show('presentation', 'presentationbreak');
More information about the Libreoffice-commits
mailing list