typescript-typenfehler behoben.. npm run lint läuft nun fehlerfrei durch.
This commit is contained in:
@@ -8,6 +8,13 @@ let enabled = false;
|
||||
let originalFetch: typeof window.fetch | null = null;
|
||||
const likeState = new Map<number, number>();
|
||||
|
||||
declare global {
|
||||
interface Window {
|
||||
__FOTOSPIEL_DEMO__?: boolean;
|
||||
__FOTOSPIEL_DEMO_ACTIVE__?: boolean;
|
||||
}
|
||||
}
|
||||
|
||||
export function shouldEnableGuestDemoMode(): boolean {
|
||||
if (typeof window === 'undefined') {
|
||||
return false;
|
||||
@@ -16,7 +23,7 @@ export function shouldEnableGuestDemoMode(): boolean {
|
||||
if (params.get('demo') === '1') {
|
||||
return true;
|
||||
}
|
||||
if ((window as any).__FOTOSPIEL_DEMO__ === true) {
|
||||
if (window.__FOTOSPIEL_DEMO__ === true) {
|
||||
return true;
|
||||
}
|
||||
const attr = document.documentElement?.dataset?.guestDemo;
|
||||
@@ -42,7 +49,7 @@ export function enableGuestDemoMode(config: DemoConfig = { fixtures: demoFixture
|
||||
};
|
||||
|
||||
enabled = true;
|
||||
(window as any).__FOTOSPIEL_DEMO_ACTIVE__ = true;
|
||||
window.__FOTOSPIEL_DEMO_ACTIVE__ = true;
|
||||
notifyDemoToast();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user