mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-24 09:46:36 +00:00
* Resolve iframe CORS errors - Fix #19724 * add newline
This commit is contained in:
parent
b9935717dc
commit
a5ec7fc251
@ -1,8 +1,13 @@
|
||||
import { MAIN_WINDOW_NAME } from "../../data/main_window";
|
||||
|
||||
export const mainWindow =
|
||||
window.name === MAIN_WINDOW_NAME
|
||||
? window
|
||||
: parent.name === MAIN_WINDOW_NAME
|
||||
? parent
|
||||
: top!;
|
||||
export const mainWindow = (() => {
|
||||
try {
|
||||
return window.name === MAIN_WINDOW_NAME
|
||||
? window
|
||||
: parent.name === MAIN_WINDOW_NAME
|
||||
? parent
|
||||
: top!;
|
||||
} catch {
|
||||
return window;
|
||||
}
|
||||
})();
|
||||
|
Loading…
x
Reference in New Issue
Block a user