fix(overlay): avoid calling push in iterable object to avoid error loading overlays (#2088)
This commit is contained in:
parent
dcf3a4b0bd
commit
b1320a9a9c
3 changed files with 8 additions and 3 deletions
5
.changeset/forty-cats-unite.md
Normal file
5
.changeset/forty-cats-unite.md
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
'@lion/ui': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
avoid calling push in iterable object to avoid error loading overlays in old chromium versions
|
||||||
4
package-lock.json
generated
4
package-lock.json
generated
|
|
@ -22698,7 +22698,7 @@
|
||||||
},
|
},
|
||||||
"packages/ajax": {
|
"packages/ajax": {
|
||||||
"name": "@lion/ajax",
|
"name": "@lion/ajax",
|
||||||
"version": "1.2.1",
|
"version": "1.2.3",
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"packages/singleton-manager": {
|
"packages/singleton-manager": {
|
||||||
|
|
@ -22707,7 +22707,7 @@
|
||||||
},
|
},
|
||||||
"packages/ui": {
|
"packages/ui": {
|
||||||
"name": "@lion/ui",
|
"name": "@lion/ui",
|
||||||
"version": "0.4.0-prerelease-bypass-export-map.0",
|
"version": "0.4.1",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@bundled-es-modules/message-format": "^6.0.4",
|
"@bundled-es-modules/message-format": "^6.0.4",
|
||||||
|
|
|
||||||
|
|
@ -119,7 +119,7 @@ export function adoptStyle(renderRoot, style, { teardown = false } = {}) {
|
||||||
if (!teardown) {
|
if (!teardown) {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
// eslint-disable-next-line no-param-reassign
|
// eslint-disable-next-line no-param-reassign
|
||||||
renderRoot.adoptedStyleSheets.push(sheet);
|
renderRoot.adoptedStyleSheets = [...renderRoot.adoptedStyleSheets, sheet];
|
||||||
} else if (renderRoot.adoptedStyleSheets.includes(sheet)) {
|
} else if (renderRoot.adoptedStyleSheets.includes(sheet)) {
|
||||||
renderRoot.adoptedStyleSheets.splice(renderRoot.adoptedStyleSheets.indexOf(sheet), 1);
|
renderRoot.adoptedStyleSheets.splice(renderRoot.adoptedStyleSheets.indexOf(sheet), 1);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue