mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
throw in not-prod instead
This commit is contained in:
parent
5f883e35cd
commit
fa2713197a
1 changed files with 2 additions and 2 deletions
|
@ -32,7 +32,7 @@ import { wrapText } from "@excalidraw/element/textWrapping";
|
||||||
import {
|
import {
|
||||||
CLASSES,
|
CLASSES,
|
||||||
getFontString,
|
getFontString,
|
||||||
isDevEnv,
|
isProdEnv,
|
||||||
updateActiveTool,
|
updateActiveTool,
|
||||||
} from "@excalidraw/common";
|
} from "@excalidraw/common";
|
||||||
|
|
||||||
|
@ -931,7 +931,7 @@ const convertElementType = <
|
||||||
app: AppClassProperties,
|
app: AppClassProperties,
|
||||||
): ExcalidrawElement => {
|
): ExcalidrawElement => {
|
||||||
if (!isValidConversion(element.type, targetType)) {
|
if (!isValidConversion(element.type, targetType)) {
|
||||||
if (isDevEnv()) {
|
if (!isProdEnv()) {
|
||||||
throw Error(`Invalid conversion from ${element.type} to ${targetType}.`);
|
throw Error(`Invalid conversion from ${element.type} to ${targetType}.`);
|
||||||
}
|
}
|
||||||
return element;
|
return element;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue