Skip to content

Commit 17d374d

Browse files
committed
chore: add validation that backToPage is number
1 parent d798a13 commit 17d374d

File tree

1 file changed

+1
-1
lines changed
  • packages/frontend/src/components/ExecutionHeader

1 file changed

+1
-1
lines changed

packages/frontend/src/components/ExecutionHeader/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ function ExecutionName(props: Pick<IExecution['flow'], 'name' | 'id'>) {
2222
const handleBack = useCallback(() => {
2323
let backUrl = URLS.EXECUTIONS_FOR_FLOW(id)
2424

25-
if (backToPage) {
25+
if (backToPage && /^\d+$/.test(backToPage)) {
2626
backUrl += `?page=${backToPage}`
2727
}
2828
navigate(backUrl)

0 commit comments

Comments
 (0)