bito-code-review[bot] commented on PR #41768:
URL: https://github.com/apache/superset/pull/41768#issuecomment-4881238527
<!-- Bito Reply -->
The flagged issue is correct. Passing an object-shaped `message` to
`sanitizeHtmlIfNeeded` causes a runtime error because the utility expects a
string. To resolve this, you should ensure `resp.message` is a string before
sanitizing, or provide a safe fallback.
Here is the corrected implementation for
`superset-frontend/src/setup/setupApp.ts`:
```typescript
.append(resp.message && typeof resp.message === 'string' ?
sanitizeHtmlIfNeeded(resp.message) : (resp.message || ''))
```
I have checked the PR comments, and there are no other comments to address.
Would you like me to proceed with any other changes?
**superset-frontend/src/setup/setupApp.ts**
```
.append(resp.message && typeof resp.message === 'string' ?
sanitizeHtmlIfNeeded(resp.message) : (resp.message || ''))
```
--
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]