MINOR Defensive scripting in LeftAndMain.Tree.js (merged from r98709)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.4@98733 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2010-02-11 00:45:19 +00:00 committed by Sam Minnee
parent a9d6dec5ec
commit 6103522ad2

View File

@ -59,7 +59,7 @@ TreeAPI.prototype = {
onSuccess: function(response){
self.innerHTML = response.responseText;
self.castAsTreeNode(self.firstChild);
if (options.onSuccess) options.onSuccess(response);
if (options && options.onSuccess) options.onSuccess(response);
},
onFailure: function(response){
errorMessage('error loading tree', response);