1
0
mirror of synced 2025-12-13 18:34:52 +08:00

Dev: Revert to use try catch #67

This commit is contained in:
surunzi
2018-05-27 19:51:42 +08:00
parent e6342d9b3f
commit 8319e5db9f

View File

@@ -1,4 +1,4 @@
import {each, has} from '../lib/util';
import {each} from '../lib/util';
function formatStyle(style)
{
@@ -45,9 +45,15 @@ export default class CssStore
let ret = [];
each(document.styleSheets, (styleSheet) =>
{
try
{
// Started with version 64, Chrome does not allow cross origin script to access this property.
if (!has(styleSheet, 'cssRules')) return;
if (!styleSheet.cssRules) return;
} catch (e)
{
return;
}
each(styleSheet.cssRules, (cssRule) =>
{