Guard against undefined series error.

pull/799/head
Hunter Trujillo 2017-01-25 14:35:47 -07:00
parent 81d214780e
commit ccb94894e8
1 changed files with 1 additions and 1 deletions

View File

@ -15,7 +15,7 @@ export default function timeSeriesToDygraph(raw = [], activeQueryIndex, isInData
}, []);
// collect each series
const serieses = results.reduce((acc, {series, responseIndex}, index) => {
const serieses = results.reduce((acc, {series = [], responseIndex}, index) => {
return [...acc, ...series.map((item) => ({...item, responseIndex, index}))];
}, []);