From fa2713197ac5fc7f10cf3c1dfb9e310554ef9436 Mon Sep 17 00:00:00 2001 From: dwelle <5153846+dwelle@users.noreply.github.com> Date: Wed, 30 Apr 2025 15:50:40 +0200 Subject: [PATCH] throw in not-prod instead --- packages/excalidraw/components/ConvertElementTypePopup.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/excalidraw/components/ConvertElementTypePopup.tsx b/packages/excalidraw/components/ConvertElementTypePopup.tsx index 141df4f85..dc0637e64 100644 --- a/packages/excalidraw/components/ConvertElementTypePopup.tsx +++ b/packages/excalidraw/components/ConvertElementTypePopup.tsx @@ -32,7 +32,7 @@ import { wrapText } from "@excalidraw/element/textWrapping"; import { CLASSES, getFontString, - isDevEnv, + isProdEnv, updateActiveTool, } from "@excalidraw/common"; @@ -931,7 +931,7 @@ const convertElementType = < app: AppClassProperties, ): ExcalidrawElement => { if (!isValidConversion(element.type, targetType)) { - if (isDevEnv()) { + if (!isProdEnv()) { throw Error(`Invalid conversion from ${element.type} to ${targetType}.`); } return element;