Roo/form/BasicForm.js
authorAlan Knowles <alan@roojs.com>
Fri, 13 Apr 2012 08:44:08 +0000 (16:44 +0800)
committerAlan Knowles <alan@roojs.com>
Fri, 13 Apr 2012 08:44:08 +0000 (16:44 +0800)
Roo/form/BasicForm.js

Roo/form/BasicForm.js

index 9bfaa12..85c0176 100644 (file)
@@ -284,7 +284,11 @@ clientValidation  Boolean          Applies to submit only.  Pass true to call fo
             // we have a scenario where updates need confirming.
             // eg. if a locking scenario exists..
             // we look for { errors : { needs_confirm : true }} in the response.
-            if (typeof(action.result.errors.needs_confirm) != 'undefined') {
+            if (
+                (typeof(action.result) != 'undefined') != 'undefined') &&
+                (typeof(action.result.errors) != 'undefined')  &&
+                (typeof(action.result.errors.needs_confirm) != 'undefined')
+          ){
                 var _t = this;
                 Roo.MessageBox.confirm(
                     "Change requires confirmation",