BUGFIX: some sections dont have a tree at all, but they still use LeftAndMain? as their base class (eg report admin). Added a guard. (from r100724)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@106109 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2010-06-03 00:15:04 +00:00
parent e35c941039
commit 576be307bc

View File

@ -27,7 +27,7 @@ var _HANDLER_FORMS = {
// make sure current ID of loaded form is actually selected in tree
var tree = $('#sitetree')[0], id = $('#Form_EditForm :input[name=ID]').val();
if(!id) id = 0;
tree.setCurrentByIdx(id);
if(tree) tree.setCurrentByIdx(id);
}, 200);
});
}(jQuery));