From 3cb3b8ea51322b6824e7f74173010b1aac6b0c1b Mon Sep 17 00:00:00 2001 From: Krist Wongsuphasawat Date: Fri, 31 May 2019 13:02:26 -0700 Subject: [PATCH] fix: lint --- .../src/encodeable/parsers/extractScale.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/superset-ui-plugins/packages/superset-ui-preset-chart-xy/src/encodeable/parsers/extractScale.ts b/plugins/superset-ui-plugins/packages/superset-ui-preset-chart-xy/src/encodeable/parsers/extractScale.ts index 6c9162b8e8..7fc1322f33 100644 --- a/plugins/superset-ui-plugins/packages/superset-ui-preset-chart-xy/src/encodeable/parsers/extractScale.ts +++ b/plugins/superset-ui-plugins/packages/superset-ui-preset-chart-xy/src/encodeable/parsers/extractScale.ts @@ -211,8 +211,11 @@ function getScaleTypeCategory(scaleType: ScaleType) { if (discreteScaleTypes.has(scaleType)) { return 'discrete'; } + if (discretizingScaleTypes.has(scaleType)) { + return 'discretizing'; + } - return 'discretizing'; + throw new Error(`Unknown scaleType ${scaleType}`); } export default function extractScale(