From 64075108114aae70919abca5e13907367405cf61 Mon Sep 17 00:00:00 2001 From: Eric NGUYEN Date: Tue, 13 Sep 2022 17:43:28 +0200 Subject: [PATCH] Fix svg scale default undefined --- src/Components/SVG/SVG.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Components/SVG/SVG.tsx b/src/Components/SVG/SVG.tsx index ecbed84..317c850 100644 --- a/src/Components/SVG/SVG.tsx +++ b/src/Components/SVG/SVG.tsx @@ -56,7 +56,7 @@ export function SVG(props: ISVGProps): JSX.Element { }); const [tool, setTool] = React.useState(TOOL_PAN); const [value, setValue] = React.useState({} as Value); - const [scale, setScale] = React.useState(value.a); + const [scale, setScale] = React.useState(value.a ?? 1); const svgViewer = React.useRef(null);