From 9b2b807edac09d620f3cd0a5c847591cb8226c8c Mon Sep 17 00:00:00 2001 From: Sankhesh Jhaveri Date: Fri, 8 Apr 2022 10:03:32 -0400 Subject: [PATCH] fix(SliceRepresentation): Ensure that point data exists --- src/core/SliceRepresentation.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/SliceRepresentation.js b/src/core/SliceRepresentation.js index 62ee567..a9166ee 100644 --- a/src/core/SliceRepresentation.js +++ b/src/core/SliceRepresentation.js @@ -195,7 +195,7 @@ export default class SliceRepresentation extends Component { if (this.props.colorDataRange === 'auto') { this.mapper.update(); const input = this.mapper.getInputData(); - const array = input && input.getPointData().getScalars(); + const array = input && input.getPointData()?.getScalars(); const dataRange = array && array.getRange(); if (dataRange) { this.lookupTable.setMappingRange(...dataRange);