Skip to content

Commit

Permalink
fix: submit forms from a page inside of folder (#4730)
Browse files Browse the repository at this point in the history
Fixes #4096
  • Loading branch information
TrySound authored Jan 7, 2025
1 parent 4f026a0 commit 9faf5b8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions apps/builder/app/canvas/interceptor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,14 @@ const isAbsoluteUrl = (href: string) => {
};

const getSelectedPagePathname = () => {
const pages = $pages.get();
const page = $selectedPage.get();
const dataSourceVariables = $dataSourceVariables.get();
if (page) {
if (page && pages) {
const system = dataSourceVariables.get(page.systemDataSourceId) as
| undefined
| System;
const tokens = tokenizePathnamePattern(page.path);
const tokens = tokenizePathnamePattern(getPagePath(page.id, pages));
return compilePathnamePattern(tokens, system?.params ?? {});
}
};
Expand Down

0 comments on commit 9faf5b8

Please sign in to comment.