[FIX] web: traceback on line graphs with only one data

Graph tooltip destruction was fixed with commit https://github.com/odoo/odoo/commit/86252428846607cd5f4b18cef8de49a8cd0b151a#diff-5de06eee7a2eeae066aa1348a1528fe9L100.
Unfortunately, the commit supposed that the 'display_' methods always
returned a graph, which is wrong.

opw-773759
This commit is contained in:
qsm-odoo
2017-09-29 12:42:20 +02:00
parent e10a3ceb6f
commit 14bd6dd277
@@ -98,7 +98,9 @@ return Widget.extend({
}));
} else {
var chart = this['display_' + this.mode]();
chart.tooltip.chartContainer(this.$el[0]);
if (chart) {
chart.tooltip.chartContainer(this.$el[0]);
}
}
},
display_bar: function () {