PromucFlow_constructor/app
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
..
client fix: handle potential null basePageId in URL generation (#41315) 2025-10-23 03:01:22 -07:00
server chore: Enforce permission while updating instance-config (#41289) 2025-10-14 11:17:15 +06:00
util