Skip to content

Commit ae5067e

Browse files
fix: check to see colors exist in the viewProperties before executing color mapping code (#3751)
1 parent 47c8067 commit ae5067e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/timeMachine/components/Vis.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,10 @@ const TimeMachineVis: FC<Props> = ({
9595
giraffeResult.table.getColumnType('_value') !== 'number' &&
9696
!!giraffeResult.table.length)
9797

98-
if (isFlagEnabled('graphColorMapping')) {
98+
if (
99+
isFlagEnabled('graphColorMapping') &&
100+
viewProperties.hasOwnProperty('colors')
101+
) {
99102
const groupKey = [...giraffeResult.fluxGroupKeyUnion, 'result']
100103
const [, fillColumnMap] = createGroupIDColumn(giraffeResult.table, groupKey)
101104
const {colorMappingForIDPE, needsToSaveToIDPE} = getColorMappingObjects(

0 commit comments

Comments
 (0)