MINOR: using better type checking

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.2@95352 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Andreas Piening 2009-12-15 00:37:05 +00:00 committed by Sam Minnee
parent 65d72f947d
commit 17d19c2de5
1 changed files with 2 additions and 2 deletions

View File

@ -140,7 +140,7 @@ CMSForm.prototype = {
var __callAfter = callAfter;
var __form = this;
if(__form.notify && __form.elements.ID != undefined) __form.notify('BeforeSave', __form.elements.ID.value);
if(__form.notify && typeof __form.elements.ID != 'undefined') __form.notify('BeforeSave', __form.elements.ID.value);
// validate if required
if(this.validate && !this.validate()) {
@ -153,7 +153,7 @@ CMSForm.prototype = {
Ajax.Evaluator(response);
__form.resetElements();
if(__callAfter) __callAfter();
if(__form.notify && __form.elements.ID != undefined) __form.notify('PageSaved', __form.elements.ID.value);
if(__form.notify && typeof __form.elements.ID != 'undefined') __form.notify('PageSaved', __form.elements.ID.value);
_AJAX_LOADING = false;
}