From 14e29f91cc2275411004e2a6674e9ef83d27e493 Mon Sep 17 00:00:00 2001 From: Markus Grigull Date: Fri, 9 Oct 2015 12:31:42 +0200 Subject: [PATCH] Fix live update while switching entities --- app/components/line-chart.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/components/line-chart.js b/app/components/line-chart.js index 9de6b5c..0c84e9d 100644 --- a/app/components/line-chart.js +++ b/app/components/line-chart.js @@ -23,7 +23,9 @@ export default Ember.Component.extend({ _drawPlot: function() { var elementId = this.get('elementId'); - $.plot('#' + elementId, this.data); + if (elementId) { + $.plot('#' + elementId, this.data); + } Ember.run.later(this, function() { this._drawPlot();