MINOR Better error checking in SiteTreeNode javasceript

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@105679 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2010-05-25 23:39:05 +00:00
parent 1e510684a3
commit e430852bef

View File

@ -421,7 +421,7 @@ SiteTreeNode.prototype = {
this.TreeNode.initialize(options);
if(this.className && this.className.match(/class\-([^\s]*)/)) {
var klass = RegExp.$1;
if(siteTreeHints && siteTreeHints[klass]) {
if(typeof siteTreeHints != 'undefined' && siteTreeHints[klass]) {
this.hints = siteTreeHints[klass];
this.dropperOptions = {
accept : (this.hints.allowedChildren && (this.className.indexOf('nochildren') == -1))