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.
TypeScript accessibilityalternativecloudflarecloudflare-workersdesignfreefrontendopen-sourceradix-uireactremixweb-developmentwebflowwebsite-builderwebsite-developmentwebsiteswebstudio
fix: BuildParams type
Andras Bacsaid7db67e461f4
diff --git a/apps/designer/app/routes/s/css.ts b/apps/designer/app/routes/s/css.tsindex fefa0244e1..fc172ecdd2 100644--- a/apps/designer/app/routes/s/css.ts+++ b/apps/designer/app/routes/s/css.ts@@ -7,7 +7,7 @@ import { generateCssText } from "~/shared/css-utils";export const loader: ActionFunction = async ({ request }) => {try {- const buildParams: BuildParams = getBuildParams(request);+ const buildParams: BuildParams | undefined = getBuildParams(request);if (buildParams === undefined) {throw json("Required project info", { status: 404 });diff --git a/apps/designer/app/shared/css-utils/generate-css-text.ts b/apps/designer/app/shared/css-utils/generate-css-text.tsindex a311151631..de8335f8a2 100644--- a/apps/designer/app/shared/css-utils/generate-css-text.ts+++ b/apps/designer/app/shared/css-utils/generate-css-text.ts@@ -7,7 +7,7 @@ import { idAttribute } from "@webstudio-is/react-sdk";import { addGlobalRules } from "~/canvas/shared/styles";import type { BuildParams } from "../router-utils";-export const generateCssText = async (buildParams: BuildParams) => {+export const generateCssText = async (buildParams: BuildParams | undefined) => {if (buildParams === undefined) {throw json("Required project info", { status: 404 });}diff --git a/apps/designer/app/shared/router-utils/build-params.ts b/apps/designer/app/shared/router-utils/build-params.tsindex 276c85d682..6dc5ee1508 100644--- a/apps/designer/app/shared/router-utils/build-params.ts+++ b/apps/designer/app/shared/router-utils/build-params.ts@@ -14,8 +14,7 @@ export type BuildParams =mode: BuildMode;pathname: string;pageId?: string;- }- | undefined;+ };// A subtype of Request. To make testing easier.type MinimalRequest = {