mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
fix: Bar chart crash when switching from Big Number (#34671)
This commit is contained in:
committed by
GitHub
parent
1101182654
commit
f6353bd1e8
@@ -16,7 +16,7 @@
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
import { JsonArray, t } from '@superset-ui/core';
|
||||
import { ensureIsArray, JsonArray, t } from '@superset-ui/core';
|
||||
import {
|
||||
ControlPanelConfig,
|
||||
ControlPanelsContainerProps,
|
||||
@@ -343,8 +343,9 @@ const config: ControlPanelConfig = {
|
||||
chartState,
|
||||
) => true,
|
||||
mapStateToProps: (state, controlState, chartState) => {
|
||||
const value: JsonArray = state.controls.groupby
|
||||
.value as JsonArray;
|
||||
const value: JsonArray = ensureIsArray(
|
||||
state.controls.groupby?.value,
|
||||
) as JsonArray;
|
||||
const valueAsStringArr: string[][] = value.map(v => {
|
||||
if (v) return [v.toString(), v.toString()];
|
||||
return ['', ''];
|
||||
|
||||
Reference in New Issue
Block a user