From 576be307bce79cd3e11d2d3ca891f942151ec4be Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Thu, 3 Jun 2010 00:15:04 +0000 Subject: [PATCH] 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 --- javascript/LeftAndMain.Tree.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/javascript/LeftAndMain.Tree.js b/javascript/LeftAndMain.Tree.js index 6c56059c..0e855517 100755 --- a/javascript/LeftAndMain.Tree.js +++ b/javascript/LeftAndMain.Tree.js @@ -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));