Add a null check to make sure we don't try to update the tree before it has rendered

This commit is contained in:
Joseph Schorr 2014-04-16 22:43:13 -04:00
parent be728ceccb
commit 5da3ffcb66

View file

@ -909,6 +909,8 @@ FileTreeBase.prototype.calculateDimensions_ = function(container) {
* Updates the dimensions of the tree.
*/
FileTreeBase.prototype.updateDimensions_ = function() {
if (!this.rootSvg_) { return; }
var container = this.container_;
var dimensions = this.calculateDimensions_(container);