MINOR: make sure the element exists before using it.

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@85124 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Normann Lou 2009-08-25 00:22:05 +00:00
parent a4b74c8ff0
commit 7eef2f4b25

View File

@ -867,9 +867,9 @@ function hideIndicator(id) {
}
var CurrentPage = {
id: function() { return $('Form_EditForm_ID').value; },
version: function() { return $('Form_EditForm_Version').value; },
isDeleted: function() { return $('SiteTree_Alert').getAttribute('deletedfromstage'); }
id: function() { if($('Form_EditForm_ID')) return $('Form_EditForm_ID').value; },
version: function() { if($('Form_EditForm_Version')) return $('Form_EditForm_Version').value; },
isDeleted: function() { if($('SiteTree_Alert')) return $('SiteTree_Alert').getAttribute('deletedfromstage'); }
}
setInterval(function() {