From add8ef3c59766ef4ff22d4a15d1ae812ea467b84 Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Fri, 22 Jan 2016 19:59:41 +0000 Subject: [PATCH] trap for ss.cssRules mysteriously returning null --- src/Tinter.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Tinter.js b/src/Tinter.js index 3612be5b10..1e1d534bd5 100644 --- a/src/Tinter.js +++ b/src/Tinter.js @@ -76,6 +76,9 @@ var cached = false; function calcCssFixups() { for (var i = 0; i < document.styleSheets.length; i++) { var ss = document.styleSheets[i]; + // Chromium apparently sometimes returns null here; unsure why. + // see $14534907369972FRXBx:matrix.org in HQ + if (!ss.cssRules) continue; for (var j = 0; j < ss.cssRules.length; j++) { var rule = ss.cssRules[j]; if (!rule.style) continue;