message: fix(explore): Value undefined and Unhashable type errors
diff: @@ -37,6 +37,7 @@ import {
  SupersetTheme,
  useTheme,
  isDefined,
  + JsonValue,
  } from '@superset-ui/core';
  import {
  ControlPanelSectionConfig,
  @@ -276,11 +277,9 @@ export const ControlPanelsContainer = (props: ControlPanelsContainerProps) => {
  >(state => state.explore.controlsTransferred);
  useEffect(() => {
  - if (props.chart.chartStatus === 'success') {
  - controlsTransferred?.forEach(controlName => {
  - const alteredControls = ensureIsArray(
  - props.controls[controlName].value,
  - ).map(value => {
  + const removeDatasourceWarningFromControl = (
  + value: JsonValue | undefined,
  + ) => {
  if (
  typeof value === 'object' &&
  isDefined(value) &&
  @@ -289,8 +288,25 @@ export const ControlPanelsContainer = (props: ControlPanelsContainerProps) => {
  return { ...value, datasourceWarning: false };
  }
  return value;
  - });
  + };
  + if (props.chart.chartStatus === 'success') {
  + controlsTransferred?.forEach(controlName => {
  + if (!isDefined(props.controls[controlName])) {
  + return;
  + }
  + if (Array.isArray(props.controls[controlName].value)) {
  + const alteredControls = ensureIsArray(
  + props.controls[controlName].value,
  + )?.map(removeDatasourceWarningFromControl);
  props.actions.setControlValue(controlName, alteredControls);
  + } else {
  + props.actions.setControlValue(
  + controlName,
  + removeDatasourceWarningFromControl(
  + props.controls[controlName].value,
  + ),
  + );
  + }
  });
  }
  }, [
  