mirror of
https://github.com/home-assistant/frontend.git
synced 2025-04-24 05:17:20 +00:00
Fix the ES5 adapter for custom panel (#3182)
* Fix the ES5 adapter for custom panel * Update custom-panel.ts * Update custom-panel.ts * Update custom-panel.ts
This commit is contained in:
parent
968eae7727
commit
d77ae840d8
@ -22,7 +22,9 @@ let es5Loaded: Promise<unknown> | undefined;
|
||||
window.loadES5Adapter = () => {
|
||||
if (!es5Loaded) {
|
||||
es5Loaded = Promise.all([
|
||||
loadJS(`${__STATIC_PATH__}custom-elements-es5-adapter.js`).catch(),
|
||||
loadJS(
|
||||
`${__STATIC_PATH__}/polyfills/custom-elements-es5-adapter.js`
|
||||
).catch(),
|
||||
import(/* webpackChunkName: "compat" */ "./compatibility"),
|
||||
]);
|
||||
}
|
||||
@ -47,7 +49,9 @@ function initialize(panel: CustomPanelInfo, properties: {}) {
|
||||
let start: Promise<unknown> = Promise.resolve();
|
||||
|
||||
if (!webComponentsSupported) {
|
||||
start = start.then(() => loadJS("/static/webcomponents-bundle.js"));
|
||||
start = start.then(() =>
|
||||
loadJS(`${__STATIC_PATH__}/polyfills/webcomponents-bundle.js`)
|
||||
);
|
||||
}
|
||||
|
||||
if (__BUILD__ === "es5") {
|
||||
|
Loading…
x
Reference in New Issue
Block a user