Skip to content

Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.

simplify

Roman Pominovf681c12e3a4e
diff --git a/apps/designer/app/routes/canvas/$projectId.tsx b/apps/designer/app/routes/canvas/$projectId.tsx
index 0712042c1a..590f5dd1c1 100644
--- a/apps/designer/app/routes/canvas/$projectId.tsx
+++ b/apps/designer/app/routes/canvas/$projectId.tsx
@@ -24,9 +24,8 @@ export const loader: LoaderFunction = async ({ params }): Promise<Data> => {
return loadCanvasData(params.projectId, params.pageId);
} catch (error) {
- const message = error instanceof Error ? error.message : String(error);
sentryException({ error });
- return { errors: message };
+ return { errors: error instanceof Error ? error.message : String(error) };
}
};
diff --git a/apps/designer/app/routes/designer/$projectId.tsx b/apps/designer/app/routes/designer/$projectId.tsx
index c0fdf58d73..f0dd31fae9 100644
--- a/apps/designer/app/routes/designer/$projectId.tsx
+++ b/apps/designer/app/routes/designer/$projectId.tsx
@@ -37,9 +37,8 @@ export const loader: LoaderFunction = async ({
return { config, project, page };
} catch (error) {
- const message = error instanceof Error ? error.message : String(error);
sentryException({ error });
- return { errors: message };
+ return { errors: error instanceof Error ? error.message : String(error) };
}
};
diff --git a/apps/designer/app/routes/preview/$projectId.tsx b/apps/designer/app/routes/preview/$projectId.tsx
index 5fd695351b..3299a6d2af 100644
--- a/apps/designer/app/routes/preview/$projectId.tsx
+++ b/apps/designer/app/routes/preview/$projectId.tsx
@@ -22,9 +22,8 @@ export const loader: LoaderFunction = async ({ params }): Promise<Data> => {
return loadCanvasData(params.projectId, params.pageId);
} catch (error) {
- const message = error instanceof Error ? error.message : String(error);
sentryException({ error });
- return { errors: message };
+ return { errors: error instanceof Error ? error.message : String(error) };
}
};