Skip to content

Commit

Permalink
πŸ› fix IE bug that cssText cannot be accessed while it prefixing with …
Browse files Browse the repository at this point in the history
…-webkit (#2532)
  • Loading branch information
aique127 authored Jun 28, 2023
1 parent c007c70 commit becb7ad
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/sandbox/patchers/css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
});
Expand All @@ -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 { ... }
Expand Down

1 comment on commit becb7ad

@vercel
Copy link

@vercel vercel bot commented on becb7ad Jun 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

qiankun – ./

qiankun-chencheng.vercel.app
qiankun.vercel.app
qiankun-git-master-chencheng.vercel.app
qiankun.umijs.org

Please sign in to comment.