From f2611f5d1f5ea8dcb6064be0b0245e6e1ff3dce8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arno=C5=A1t=20Pleskot?= Date: Tue, 8 Aug 2023 16:26:33 +0200 Subject: [PATCH] fix: initial state --- src/appState.ts | 4 +++- src/types.ts | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/appState.ts b/src/appState.ts index c835f7a5b..b51b430e0 100644 --- a/src/appState.ts +++ b/src/appState.ts @@ -5,6 +5,7 @@ import { DEFAULT_FONT_FAMILY, DEFAULT_FONT_SIZE, DEFAULT_TEXT_ALIGN, + EXPORT_BACKGROUND_IMAGES, EXPORT_SCALES, THEME, } from "./constants"; @@ -100,7 +101,8 @@ export const getDefaultAppState = (): Omit< pendingImageElementId: null, showHyperlinkPopup: false, selectedLinearElement: null, - exportBackgroundImage: DEFAULT_EXPORT_BACKGROUND_IMAGE, + exportBackgroundImage: + EXPORT_BACKGROUND_IMAGES[DEFAULT_EXPORT_BACKGROUND_IMAGE].path, }; }; diff --git a/src/types.ts b/src/types.ts index 70dfe8742..7446d20ed 100644 --- a/src/types.ts +++ b/src/types.ts @@ -238,7 +238,7 @@ export type AppState = { pendingImageElementId: ExcalidrawImageElement["id"] | null; showHyperlinkPopup: false | "info" | "editor"; selectedLinearElement: LinearElementEditor | null; - exportBackgroundImage: string; + exportBackgroundImage: string | null; }; export type UIAppState = Omit<