You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "justinpark (via GitHub)" <gi...@apache.org> on 2023/04/20 17:01:34 UTC

[GitHub] [superset] justinpark commented on a diff in pull request #23758: fix: Make sure the DeprecatedSelect label is always a string

justinpark commented on code in PR #23758:
URL: https://github.com/apache/superset/pull/23758#discussion_r1172871351


##########
superset-frontend/src/components/DeprecatedSelect/DeprecatedSelect.tsx:
##########
@@ -167,7 +167,7 @@ function styled<
       getOptionLabel = option =>
         typeof option === 'string'
           ? option
-          : option[labelKey] || option[valueKey],
+          : String(option[labelKey]) || String(option[valueKey]),

Review Comment:
   `null` or `undefined` value can be a string of `null` or `undefined` (which might be intended.)
   
   ```suggestion
             : `${option[labelKey] ?? option[valueKey] ?? ''}`
   ```



-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org