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

Michael Meeks (via logerrit) logerrit at kemper.freedesktop.org
Thu Apr 30 17:02:06 UTC 2020


 loleaflet/js/global.js |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

New commits:
commit e9abaaf71b23809fe96c5475030363d623b753a3
Author:     Michael Meeks <michael.meeks at collabora.com>
AuthorDate: Thu Apr 30 16:29:26 2020 +0100
Commit:     Michael Meeks <michael.meeks at collabora.com>
CommitDate: Thu Apr 30 19:01:46 2020 +0200

    Proxy: tolerate missing CSS files during CSS re-write.
    
    Change-Id: I3d5af4950962391466192fdb391915d02f8813ed
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/93221
    Tested-by: Michael Meeks <michael.meeks at collabora.com>
    Reviewed-by: Michael Meeks <michael.meeks at collabora.com>

diff --git a/loleaflet/js/global.js b/loleaflet/js/global.js
index 07ae23ad9..c5546f7c2 100644
--- a/loleaflet/js/global.js
+++ b/loleaflet/js/global.js
@@ -402,7 +402,13 @@
 				relBases.pop(); // bin last - css name.
 				var replaceBase = 'url("' + relBases.join('/') + '/images/';
 
-				var rules = sheets[i].cssRules || sheets[i].rules;
+				var rules;
+				try {
+					rules = sheets[i].cssRules || sheets[i].rules;
+				} catch (err) {
+					console.log('Missing CSS from ' + sheets[i].href);
+					continue;
+				}
 				for (var r = 0; r < rules.length; ++r) {
 					if (!rules[r] || !rules[r].style)
 						continue;


More information about the Libreoffice-commits mailing list