bito-code-review[bot] commented on PR #44734:
URL: https://github.com/apache/superset/pull/44734#issuecomment-5862324397
<!-- Bito Reply -->
The flagged issue is correct. Converting `null` to `[]` causes the dashboard
to treat the state as having no active tabs, which prevents the default tab
from being selected during permalink hydration.
To resolve this, you should only include `activeTabs` in the payload if it
is truthy and contains values, or ensure that `null` is handled by preserving
the default behavior rather than forcing an empty array.
Here is the corrected implementation for
`superset-frontend/src/utils/urlUtils.ts`:
```typescript
// Only include activeTabs if it is defined and not null
const payload: JsonObject = {
urlParams: getDashboardUrlParams(),
dataMask,
...(activeTabs && { activeTabs }),
anchor,
};
```
I have checked the PR and there are no other comments to address. Would you
like me to proceed with any other changes?
**superset-frontend/src/utils/urlUtils.ts**
```
// Only include activeTabs if it is defined and not null
const payload: JsonObject = {
urlParams: getDashboardUrlParams(),
dataMask,
...(activeTabs && { activeTabs }),
anchor,
};
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]