ktmud commented on a change in pull request #19076:
URL: https://github.com/apache/superset/pull/19076#discussion_r823796724



##########
File path: superset-frontend/src/components/Select/utils.ts
##########
@@ -61,7 +61,7 @@ export function findValue<OptionType extends OptionTypeBase>(
 }
 
 export function getValue(option: string | number | { value: string | number }) 
{
-  return typeof option === 'object' ? option.value : option;
+  return option && typeof option === 'object' ? option.value : option;

Review comment:
       If we are allowing `option` to be `null` then we need to update the 
signature of `getValue` as well (add `| null`).




-- 
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]

Reply via email to