WebApp = {

  _isCssLoaded: function () {
    return _.find(document.styleSheets, function (sheet) {
      if (sheet.cssText && !sheet.cssRules) // IE8
        return !sheet.cssText.match(/meteor-css-not-found-error/);
      return !_.find(sheet.cssRules, function (rule) {
        return rule.selectorText === '.meteor-css-not-found-error';
      });
    });
  }
};

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/);
      return !_.find(sheet.cssRules, function (rule) {
        return rule.selectorText === '.meteor-css-not-found-error';
      });
    });
  }
};

Fix eternal reload on pages with no stylesheets.
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).
