🐛 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);
|
||||
break;
|
||||
default:
|
||||
css += `${rule.cssText}`;
|
||||
if (typeof rule.cssText === 'string') {
|
||||
css += `${rule.cssText}`;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
|
@ -121,7 +124,11 @@ export class ScopedCSS {
|
|||
|
||||
const selector = rule.selectorText.trim();
|
||||
|
||||
let { cssText } = rule;
|
||||
let cssText = '';
|
||||
if (typeof rule.cssText === 'string') {
|
||||
cssText = rule.cssText;
|
||||
}
|
||||
|
||||
// handle html { ... }
|
||||
// handle body { ... }
|
||||
// handle :root { ... }
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user