diff --git a/applications/browser-extension/src/components/formBuilder/widgets/RichTextWidget.tsx b/applications/browser-extension/src/components/formBuilder/widgets/RichTextWidget.tsx index 61c19c4654..6b15565abc 100644 --- a/applications/browser-extension/src/components/formBuilder/widgets/RichTextWidget.tsx +++ b/applications/browser-extension/src/components/formBuilder/widgets/RichTextWidget.tsx @@ -18,7 +18,7 @@ import React from "react"; import { type WidgetProps } from "@rjsf/utils"; import RichTextEditor from "@/components/richTextEditor/RichTextEditor"; -import { validateUUID } from "@/types/helpers"; +import {isUUID} from "@/types/helpers"; const RichTextWidget: React.FunctionComponent = ({ id, @@ -45,7 +45,7 @@ const RichTextWidget: React.FunctionComponent = ({ onBlur(id, editor.getHTML()); }} editable={!(disabled || readonly)} - assetDatabaseId={validateUUID(database)} + assetDatabaseId={typeof database === "string" && isUUID(database) ? database : null} content={typeof value === "string" ? value : ""} /> ); diff --git a/applications/browser-extension/src/components/richTextEditor/RichTextEditor.tsx b/applications/browser-extension/src/components/richTextEditor/RichTextEditor.tsx index 867cfaa247..2c647c93dd 100644 --- a/applications/browser-extension/src/components/richTextEditor/RichTextEditor.tsx +++ b/applications/browser-extension/src/components/richTextEditor/RichTextEditor.tsx @@ -29,7 +29,7 @@ import ErrorToast from "@/components/richTextEditor/ErrorToast"; type EditorProps = EditorProviderProps & { // A PixieBrix asset database ID to use for uploading images. If not included, the image extension will be disabled. - assetDatabaseId?: UUID; + assetDatabaseId?: UUID | null; }; interface ImageWithAssetDatabaseOptions extends ImageOptions {