mirror of
https://github.com/silverstripe/silverstripe-subsites
synced 2024-10-22 11:05:55 +02:00
MINOR JS bug (missing ')')
MINOR check that SiteTree exists before trying to write to it (from r82342)
This commit is contained in:
parent
b40af7d2e3
commit
4801838dd0
@ -3,9 +3,11 @@ Behaviour.register({
|
||||
onchange: function() {
|
||||
var request = new Ajax.Request(SiteTreeHandlers.controller_url + '/changesubsite?SubsiteID=' + this.value + '&ajax=1', {
|
||||
onSuccess: function(response) {
|
||||
$('sitetree').innerHTML = response.responseText;
|
||||
SiteTree.applyTo($('sitetree'));
|
||||
$('sitetree').getTreeNodeByIdx(0).onselect();
|
||||
if ($('sitetree')) {
|
||||
$('sitetree').innerHTML = response.responseText;
|
||||
SiteTree.applyTo($('sitetree'));
|
||||
$('sitetree').getTreeNodeByIdx(0).onselect();
|
||||
}
|
||||
},
|
||||
|
||||
onFailure: function(response) {
|
||||
|
Loading…
Reference in New Issue
Block a user