Fix eternal reload on pages with no stylesheets.

This fixes test-in-console, which was never completing test runs because
the page would reload constantly (or something).
This commit is contained in:
Emily Stark
2014-02-02 15:31:58 -08:00
parent 2907e65e33
commit dd6d6a702b

View File

@@ -1,6 +1,9 @@
WebApp = {
_isCssLoaded: function () {
if (document.styleSheets.length === 0)
return true;
return _.find(document.styleSheets, function (sheet) {
if (sheet.cssText && !sheet.cssRules) // IE8
return !sheet.cssText.match(/meteor-css-not-found-error/);