From d2ee7b88fb6930f9bf88a012d16772b282870f49 Mon Sep 17 00:00:00 2001 From: Oliver Date: Tue, 27 Jun 2023 11:36:20 -0400 Subject: [PATCH] update for AddPageButton --- packages/studio/src/store/StudioActions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/studio/src/store/StudioActions.ts b/packages/studio/src/store/StudioActions.ts index 6612316b1..36a5791d8 100644 --- a/packages/studio/src/store/StudioActions.ts +++ b/packages/studio/src/store/StudioActions.ts @@ -278,7 +278,7 @@ export default class StudioActions { } const pagesPath = this.getStudioConfig().paths.pages; const filepath = path.join(pagesPath, pageName + ".tsx"); - if (!path.isAbsolute(filepath) || !filepath.startsWith(pagesPath)) { + if (!filepath.startsWith(pagesPath)) { throw new Error(`Error adding page: pageName is invalid: ${pageName}`); } const errorChars = pageName.match(/[\\/?%*:|"<>]/g);