From 84198be0d6ea2fb6f405311f154a51ea55bc579d Mon Sep 17 00:00:00 2001 From: Lachlan Kermode Date: Tue, 21 Jul 2020 09:49:03 +0200 Subject: [PATCH] fix corner case when bad data --- src/components/Timeline.jsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/Timeline.jsx b/src/components/Timeline.jsx index 1d1198f..bd34538 100644 --- a/src/components/Timeline.jsx +++ b/src/components/Timeline.jsx @@ -282,6 +282,8 @@ class Timeline extends React.Component { if (GRAPH_NONLOCATED && GRAPH_NONLOCATED.categories.includes(category)) { return this.state.dims.marginTop + domain.projects[project].offset + this.props.ui.eventRadius } + if (!this.state.scaleY) return 0 + return this.state.scaleY(category) }