TypeError: Cannot read property 'length' of null in react component

๐Ÿ‘:-1

It might because of this:

currentDatasets[idx].data.splice(retainedDataset.data.length)

You should have a check on retainedDataset.data also:

if (retainedDataset && retainedDataset.data) { ... }

Leave a comment