diff --git a/app/configurator/components/layout-configurator.tsx b/app/configurator/components/layout-configurator.tsx index 122d1488d..795fcba5e 100644 --- a/app/configurator/components/layout-configurator.tsx +++ b/app/configurator/components/layout-configurator.tsx @@ -33,6 +33,7 @@ import { DashboardTimeRangeFilter, getChartConfig, LayoutDashboard, + LayoutTextBlock, ReactGridLayoutType, } from "@/config-types"; import { LayoutAnnotator } from "@/configurator/components/annotators"; @@ -571,7 +572,10 @@ const LayoutBlocksConfigurator = () => {
{blocks - .filter((b) => b.type === "text") + .filter( + (block): block is LayoutTextBlock & { initialized: boolean } => + block.type === "text" + ) .map((block) => ( - c.charCodeAt(0) + let arrayBuffer: Uint8Array = Uint8Array.from( + atob(dataUrl.split(",")[1]), + (c) => c.charCodeAt(0) ); pngMetadata?.forEach(({ key, value }) => {