mirror of
https://github.com/ramvignesh-b/pi-ku.git
synced 2026-05-04 08:56:52 +00:00
fix: add optional chaining to canvasData to prevent runtime errors when objects are undefined
This commit is contained in:
@@ -73,7 +73,7 @@ export default function Editor() {
|
|||||||
|
|
||||||
// replace image src with encrypted image filename
|
// replace image src with encrypted image filename
|
||||||
const canvasData = canvasRef.current?.getData();
|
const canvasData = canvasRef.current?.getData();
|
||||||
canvasData.objects = canvasData.objects?.map(
|
canvasData?.objects?.map(
|
||||||
(
|
(
|
||||||
obj: Record<string, unknown>, // fabric is too quirky for any other type
|
obj: Record<string, unknown>, // fabric is too quirky for any other type
|
||||||
) =>
|
) =>
|
||||||
|
|||||||
Reference in New Issue
Block a user