[view/flot-graph,bugfix][xs]: fix exception on data change when flot not visible.

This commit is contained in:
Rufus Pollock 2012-02-24 09:07:59 +00:00
parent 12bb498d52
commit f6dc590b3c

View File

@ -137,7 +137,7 @@ my.FlotGraph = Backbone.View.extend({
// Uncaught Invalid dimensions for plot, width = 0, height = 0
// * There is no data for the plot -- either same error or may have issues later with errors like 'non-existent node-value'
var areWeVisible = !jQuery.expr.filters.hidden(this.el[0]);
if (!this.plot && (!areWeVisible || this.model.currentDocuments.length == 0)) {
if ((!areWeVisible || this.model.currentDocuments.length == 0)) {
return
}
// create this.plot and cache it