Permalink
Browse files

Fix submit button check in Remote.Form to account for undefined and n…

…ull values
  • Loading branch information...
1 parent c22449d commit 4900c7050024e537168fec2cca024f54528fb820 @nesquena committed Jul 2, 2009
Showing with 3 additions and 3 deletions.
  1. +1 −1 dist/lowpro.js
  2. +1 −1 src/core_behaviors.js
  3. +1 −1 test/lowpro.js
View
2 dist/lowpro.js
@@ -344,7 +344,7 @@ Remote.Form = Behavior.create(Remote.Base, {
}
},
onsubmit : function() {
- var additionalParameters = (this._submitButton !== null) ? { submit: this._submitButton.name } : {};
+ var additionalParameters = (this._submitButton) ? { submit: this._submitButton.name } : {};
var options = Object.extend({
url : this.element.action,
method : this.element.method || 'get',
View
2 src/core_behaviors.js
@@ -49,7 +49,7 @@ Remote.Form = Behavior.create(Remote.Base, {
}
},
onsubmit : function() {
- var additionalParameters = (this._submitButton !== null) ? { submit: this._submitButton.name } : {};
+ var additionalParameters = (this._submitButton) ? { submit: this._submitButton.name } : {};
var options = Object.extend({
url : this.element.action,
method : this.element.method || 'get',
View
2 test/lowpro.js
@@ -344,7 +344,7 @@ Remote.Form = Behavior.create(Remote.Base, {
}
},
onsubmit : function() {
- var additionalParameters = (this._submitButton !== null) ? { submit: this._submitButton.name } : {};
+ var additionalParameters = (this._submitButton) ? { submit: this._submitButton.name } : {};
var options = Object.extend({
url : this.element.action,
method : this.element.method || 'get',

0 comments on commit 4900c70

Please sign in to comment.