diff --git a/frontend/src/ts/popups/skeleton.ts b/frontend/src/ts/popups/skeleton.ts index a74e4a946..ee6e637d0 100644 --- a/frontend/src/ts/popups/skeleton.ts +++ b/frontend/src/ts/popups/skeleton.ts @@ -3,6 +3,7 @@ const skeletons = new Map(); export function save(id: string, removeAfter = true): void { const el = document.getElementById(id) as HTMLElement; + if (!el) throw new Error(`Element with id ${id} not found`); skeletons.set(id, el); if (removeAfter) remove(id); }