🐛 fix IE bug that cssText cannot be accessed while it prefixing with -webkit (#2532)
This commit is contained in:
parent
c007c702da
commit
becb7ada77
|
|
@ -102,7 +102,10 @@ export class ScopedCSS {
|
||||||
css += this.ruleSupport(rule as CSSSupportsRule, prefix);
|
css += this.ruleSupport(rule as CSSSupportsRule, prefix);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
css += `${rule.cssText}`;
|
if (typeof rule.cssText === 'string') {
|
||||||
|
css += `${rule.cssText}`;
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -121,7 +124,11 @@ export class ScopedCSS {
|
||||||
|
|
||||||
const selector = rule.selectorText.trim();
|
const selector = rule.selectorText.trim();
|
||||||
|
|
||||||
let { cssText } = rule;
|
let cssText = '';
|
||||||
|
if (typeof rule.cssText === 'string') {
|
||||||
|
cssText = rule.cssText;
|
||||||
|
}
|
||||||
|
|
||||||
// handle html { ... }
|
// handle html { ... }
|
||||||
// handle body { ... }
|
// handle body { ... }
|
||||||
// handle :root { ... }
|
// handle :root { ... }
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user