Make sure that we only save the tree reference if we have actually rendered it.
This commit is contained in:
parent
c2ed1a9e52
commit
8da4104e7b
2 changed files with 30 additions and 22 deletions
|
@ -196,6 +196,11 @@ ImageHistoryTree.prototype.draw = function(container) {
|
|||
var rootSvg = d3.select("#" + container).append("svg:svg")
|
||||
.attr("class", "image-tree");
|
||||
|
||||
if (!rootSvg) {
|
||||
this.container_ = null;
|
||||
return;
|
||||
}
|
||||
|
||||
var vis = rootSvg.append("svg:g");
|
||||
if (!vis) {
|
||||
this.container_ = null;
|
||||
|
@ -266,6 +271,8 @@ ImageHistoryTree.prototype.draw = function(container) {
|
|||
|
||||
this.setTag_(this.currentTag_);
|
||||
this.setupOverscroll_();
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
|
||||
|
|
Reference in a new issue