mistercrunch commented on code in PR #33603:
URL: https://github.com/apache/superset/pull/33603#discussion_r2143805641
##########
superset-frontend/packages/superset-ui-core/src/validator/validateMapboxStylesUrl.ts:
##########
@@ -21,16 +21,22 @@ import { t } from '../translation';
/**
* Validate a [Mapbox styles
URL](https://docs.mapbox.com/help/glossary/style-url/)
+ * or a title server URL.
* @param v
*/
export default function validateMapboxStylesUrl(v: unknown) {
if (
typeof v === 'string' &&
v.trim().length > 0 &&
- v.trim().startsWith('mapbox://styles/')
+ (v.trim().startsWith('mapbox://styles/') ||
Review Comment:
How about `trim()` once above the `if` block?
--
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]