From 2ab340f3f1c3ebdbecf6efcf45b5921ee8e15df3 Mon Sep 17 00:00:00 2001 From: Purwa Shrivastava Date: Fri, 6 Dec 2019 11:11:25 +0100 Subject: [PATCH] React rendering Errors for few apps. --- src/data-table/index.jsx | 2 +- src/linked-scroll/linked-scroll-wrapper.jsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/data-table/index.jsx b/src/data-table/index.jsx index 3a62a44..d7fb9ab 100644 --- a/src/data-table/index.jsx +++ b/src/data-table/index.jsx @@ -48,7 +48,7 @@ class DataTable extends React.PureComponent { dimension2.forEach((dim2) => { measurements.forEach((measure) => { for (index = 0; index < injectSeparatorsArray.length; index++) { - if (dimension1[dimIndex].displayValue === injectSeparatorsArray[index].parents.dimension1.header) { + if (injectSeparatorsArray[index].parents && dimension1[dimIndex].displayValue === injectSeparatorsArray[index].parents.dimension1.header) { if (dim2.displayValue === injectSeparatorsArray[index].parents.dimension2.header) { if (measure.name === injectSeparatorsArray[index].parents.measurement.header) { measurementDataRow.push(injectSeparatorsArray[index]); diff --git a/src/linked-scroll/linked-scroll-wrapper.jsx b/src/linked-scroll/linked-scroll-wrapper.jsx index be95b55..f0e7a2d 100644 --- a/src/linked-scroll/linked-scroll-wrapper.jsx +++ b/src/linked-scroll/linked-scroll-wrapper.jsx @@ -33,7 +33,7 @@ class LinkedScrollWrapper extends React.PureComponent { unlinkComponent (component) { const componentIndex = this.scrollElements.map(element => element.component).indexOf(component); if (componentIndex !== -1) { - this.scrollElements.removeAt(componentIndex); + this.scrollElements.splice(componentIndex, 1); // eslint-disable-next-line react/no-find-dom-node const node = ReactDOM.findDOMNode(component); node.onscroll = null;