korbit-ai[bot] commented on code in PR #33965:
URL: https://github.com/apache/superset/pull/33965#discussion_r2222002615
##########
superset-frontend/src/features/databases/DatabaseModal/index.tsx:
##########
@@ -316,7 +316,11 @@ export function dbReducer(
...extraJson,
schemas_allowed_for_file_upload: (action.payload.value || '')
.split(',')
- .filter(schema => schema !== ''),
+ .filter((schema, index, arr) => {
+ const trimmed = schema.trim();
+ if (index === arr.length - 1) return true;
+ return trimmed !== '';
+ }),
Review Comment:
Ah, I see - we need to avoid adding empty schemas altogether. Let's modify
the filter to:
```typescript
.split(',')
.map(schema => schema.trim())
.filter(schema => schema !== '')
```
This will keep only non-empty schemas after trimming.
--
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]