loleaflet/src/control/Control.Toolbar.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
New commits: commit 6eb1c759a8fd54e1a191c25743d7f7e5ce172f54 Author: Henry Castro <[email protected]> AuthorDate: Fri Oct 25 15:44:37 2019 -0400 Commit: Henry Castro <[email protected]> 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 <[email protected]> Tested-by: Henry Castro <[email protected]> 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'); _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
