From cdba4c1491d318d378fb856810cfdcb7298ef09e Mon Sep 17 00:00:00 2001 From: yotamberk Date: Sun, 1 Jan 2017 11:40:07 +0200 Subject: [PATCH] Fix: Fixes error in React example when adding a ranged item (#2521) * Fix redraw order * Fix error when option is not defined * Allow template labels * Fix react example --- examples/timeline/other/usingReact.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/timeline/other/usingReact.html b/examples/timeline/other/usingReact.html index f6d1e1f7..ba7bb49f 100644 --- a/examples/timeline/other/usingReact.html +++ b/examples/timeline/other/usingReact.html @@ -88,10 +88,12 @@ end: new Date(1000*60*60*24 + (new Date()).valueOf()), editable: true, template: function (item, element) { + if (!item) { return } ReactDOM.unmountComponentAtNode(element); return ReactDOM.render(, element); }, groupTemplate: function (group, element) { + if (!item) { return } ReactDOM.unmountComponentAtNode(element); return ReactDOM.render(, element); }