summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views/graph
diff options
context:
space:
mode:
authorAdrien Dieudonne <adr@odoo.com>2018-08-17 15:34:04 +0200
committerAdrien Dieudonne <adr@odoo.com>2018-08-20 11:11:59 +0200
commit102a63b815a5a563aae13ce4784c0986581bc067 (patch)
tree77f2325c319195dd84dab575edb94aff8ca001a1 /addons/web/static/src/js/views/graph
parent984addefe666490c8127829b8cd4fb28e662d013 (diff)
[FIX] web: graph_renderer: check graph data before rendering
Before this commit, a crash occured when you tried to load a bar chart without any data. Example in Purchase -> Reporting. Since this commit 3d2ca810, we do some data processing without checking if data exists. To fix this, we have to always makes some checks before rendering the graph by calling _render.
Diffstat (limited to 'addons/web/static/src/js/views/graph')
-rw-r--r--addons/web/static/src/js/views/graph/graph_renderer.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web/static/src/js/views/graph/graph_renderer.js b/addons/web/static/src/js/views/graph/graph_renderer.js
index 9f6fe65cd5a..e801fcc5323 100644
--- a/addons/web/static/src/js/views/graph/graph_renderer.js
+++ b/addons/web/static/src/js/views/graph/graph_renderer.js
@@ -57,7 +57,7 @@ return AbstractRenderer.extend({
on_attach_callback: function () {
this._super.apply(this, arguments);
this.isInDOM = true;
- this._renderGraph();
+ this._render();
},
/**
* @override