[Libreoffice-commits] online.git: loleaflet/dist

Henry Castro hcastro at collabora.com
Sat Jul 23 00:38:05 UTC 2016


 loleaflet/dist/toolbar/toolbar.js |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit fa02df7ad32c24b2154b964945f901c1b9e26f5c
Author: Henry Castro <hcastro at collabora.com>
Date:   Fri Jul 22 20:36:45 2016 -0400

    loleaflet: avoid Uncaught TypeError: Cannot read property
    
    Uncaught TypeError: Cannot read property 'toLowerCase' of undefined

diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js
index 4e25d6b..8cdf473 100644
--- a/loleaflet/dist/toolbar/toolbar.js
+++ b/loleaflet/dist/toolbar/toolbar.js
@@ -833,7 +833,7 @@ map.on('commandstatechanged', function (e) {
 			// For writer we get UI names; ideally we should be getting only programmatic ones
 			// For eg: 'Text body' vs 'Text Body'
 			// (likely to be fixed in core to make the pattern consistent)
-			if (value.toLowerCase() === state.toLowerCase()) {
+			if (state && value.toLowerCase() === state.toLowerCase()) {
 				state = value;
 				found = true;
 				return;


More information about the Libreoffice-commits mailing list