mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-28 01:25:00 +00:00
Fix Eslint issues
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
import { is_object_ready } from "../../../../../../ChillDocStoreBundle/Resources/public/vuejs/StoredObjectButton/helpers";
|
||||
import {
|
||||
StoredObject,
|
||||
} from "../../../../../../ChillDocStoreBundle/Resources/public/types";
|
||||
import { is_object_ready } from "ChillDocStoreAssets/vuejs/StoredObjectButton/helpers";
|
||||
import { StoredObject } from "ChillDocStoreAssets/types";
|
||||
|
||||
declare global {
|
||||
interface Window {
|
||||
stored_object: string | undefined;
|
||||
}
|
||||
}
|
||||
|
||||
async function reload_if_needed(
|
||||
stored_object: StoredObject,
|
||||
@@ -25,14 +29,12 @@ function wait_before_reload(stored_object: StoredObject, i: number): void {
|
||||
setTimeout(reload_if_needed, timeout, stored_object, i);
|
||||
}
|
||||
|
||||
window.addEventListener("DOMContentLoaded", async function (e) {
|
||||
if (undefined === (window as any).stored_object) {
|
||||
window.addEventListener("DOMContentLoaded", async function () {
|
||||
if (undefined === window.stored_object) {
|
||||
console.error("window.stored_object is undefined");
|
||||
throw Error("window.stored_object is undefined");
|
||||
}
|
||||
|
||||
const stored_object = JSON.parse(
|
||||
(window as any).stored_object,
|
||||
) as StoredObject;
|
||||
const stored_object = JSON.parse(window.stored_object) as StoredObject;
|
||||
reload_if_needed(stored_object, 0);
|
||||
});
|
||||
|
Reference in New Issue
Block a user