X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/530ef4b6c5b943cfa68b779d11cf7de29aa878bf..b37ceabb82336ee82757cd32efe353cfab8ec267:/src/widgets/tree/TreePanel.js diff --git a/src/widgets/tree/TreePanel.js b/src/widgets/tree/TreePanel.js index d2bc2153..d2e48008 100644 --- a/src/widgets/tree/TreePanel.js +++ b/src/widgets/tree/TreePanel.js @@ -1,5 +1,5 @@ /*! - * Ext JS Library 3.2.1 + * Ext JS Library 3.2.2 * Copyright(c) 2006-2010 Ext JS, Inc. * licensing@extjs.com * http://www.extjs.com/license @@ -638,6 +638,12 @@ new Ext.tree.TreePanel({ * (bSuccess, oLastNode) where bSuccess is if the expand was successful and oLastNode is the last node that was expanded. */ expandPath : function(path, attr, callback){ + if(Ext.isEmpty(path)){ + if(callback){ + callback(false, undefined); + } + return; + } attr = attr || 'id'; var keys = path.split(this.pathSeparator); var curNode = this.root; @@ -676,6 +682,12 @@ new Ext.tree.TreePanel({ * (bSuccess, oSelNode) where bSuccess is if the selection was successful and oSelNode is the selected node. */ selectPath : function(path, attr, callback){ + if(Ext.isEmpty(path)){ + if(callback){ + callback(false, undefined); + } + return; + } attr = attr || 'id'; var keys = path.split(this.pathSeparator), v = keys.pop();