fix(compiler): make ShadowCSS shim work on Android browser (#11139)
Fixes #11123
This commit is contained in:
parent
7dee1ee4cf
commit
38069aba35
|
@ -383,6 +383,8 @@ export class ShadowCss {
|
|||
// scope via name and [is=name]
|
||||
private _applySimpleSelectorScope(selector: string, scopeSelector: string, hostSelector: string):
|
||||
string {
|
||||
// In Android browser, the lastIndex is not reset when the regex is used in String.replace()
|
||||
_polyfillHostRe.lastIndex = 0;
|
||||
if (_polyfillHostRe.test(selector)) {
|
||||
const replaceBy = this.strictStyling ? `[${hostSelector}]` : scopeSelector;
|
||||
selector = StringWrapper.replace(selector, _polyfillHostNoCombinator, replaceBy);
|
||||
|
|
Loading…
Reference in New Issue