PromucFlow_constructor/app/client
Jacques Ikot fb723a7d07
fix: handle potential null basePageId in URL generation (#41315)
# PR Description

## Summary
Fixes an issue where `basePageId` could be undefined during initial page
load or navigation, causing errors in the URL builder.

## Changes
- Added fallback to `null` for `basePageId` in Header component when
undefined
- Wrapped `urlBuilderFn` call in try-catch block to gracefully handle
missing `basePageId`
- Returns empty string for href when `basePageId` is not yet available

## Why
During initial page load or navigation transitions,
`currentPage?.basePageId` may not be available yet, which could cause
the URL builder to throw errors. This change ensures the application
handles this edge case gracefully by providing a fallback value and
catching any errors that may occur.

## Automation

/ok-to-test tags="@tag.Git"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/18742901184>
> Commit: 48dc01a73bbb816b63acd186d9d80eb36cdf5814
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=18742901184&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Git`
> Spec:
> <hr>Thu, 23 Oct 2025 09:48:19 UTC
<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [ ] No
2025-10-23 03:01:22 -07:00
..
.husky chore: adds depandabot.yml (#40521) 2025-05-01 05:44:04 +00:00
.yarn
config fix: Suppress webpack-dev-server ResizeObserver loop development runtime error (#40968) 2025-06-18 11:16:53 +05:30
cypress chore: enabled autocommit (#41255) 2025-09-24 11:31:43 +06:00
docker/templates chore: add grafana faro sdk (CE) (#38301) 2024-12-26 10:37:41 +05:30
generators chore: decouple formControl registry from the main chunk (#40939) 2025-06-17 17:20:23 +05:30
packages fix: CVE-2025-58754 by upgrading axios dependency (#41295) 2025-10-17 17:02:48 +06:00
public chore: add maximum-scale to avoid zoom on inputs in iOS (#40171) 2025-04-08 19:16:31 +05:30
scripts fix: Upgrade packages (#40935) 2025-06-16 12:12:55 +05:30
src fix: handle potential null basePageId in URL generation (#41315) 2025-10-23 03:01:22 -07:00
test chore: decouple formControl registry from the main chunk (#40939) 2025-06-17 17:20:23 +05:30
typings
.babelrc chore: Eject CRA (#39264) 2025-02-14 14:24:41 +05:30
.dockerignore
.editorconfig
.eslintrc.base.json feat: add react-compiler eslint plugin (#37139) 2024-10-31 16:40:18 +01:00
.eslintrc.js
.fork-ts-checkerrc
.gitignore
.lintstagedrc.json chore: update import of AppState to DefaultReduxState (#40494) 2025-05-01 15:53:37 +05:30
.nvmrc
.prettierignore
.prettierrc
.sentryclirc
.yarnrc.yml
build.sh fix: sourcemaps (#39301) 2025-02-16 20:05:50 +03:00
cypress_ci_custom.config.ts chore: Remove Airtable tests from being excluded from CI runs (#40932) 2025-06-17 10:00:06 +05:30
cypress_ci_hosted.config.ts chore: Remove Airtable tests from being excluded from CI runs (#40932) 2025-06-17 10:00:06 +05:30
cypress_ci.config.ts chore: Remove Airtable tests from being excluded from CI runs (#40932) 2025-06-17 10:00:06 +05:30
cypress-add-tags.js
cypress.config.ts
download-assets.js
jest.config.js fix: Upgrade packages (#40935) 2025-06-16 12:12:55 +05:30
knip.json chore: Eject CRA (#39264) 2025-02-14 14:24:41 +05:30
package.json fix: CVE-2025-58754 by upgrading axios dependency (#41295) 2025-10-17 17:02:48 +06:00
README.md
README.old.md
start-caddy.sh
start-https.sh chore: convert consolidated api etag to a weak one (#38939) 2025-01-31 16:35:20 +05:30
tailwind.config.js
tsconfig.json
tsconfig.path.json
vercel.json
yarn.lock fix: CVE-2025-58754 by upgrading axios dependency (#41295) 2025-10-17 17:02:48 +06:00

Appsmith Client

This project was bootstrapped with Create React App.

For details on setting up your development machine, please refer to the Setup Guide