Skip to content

Commit

Permalink
Moved variable 'type' declaration to outer function scope.
Browse files Browse the repository at this point in the history
Doing this against my conviction in order to settle madrobby#980. Would much
prefer to move variables to the inner-most scope instead.
  • Loading branch information
cederberg committed Jul 12, 2014
1 parent 821d3b9 commit 027a620
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/form.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

;(function($){
$.fn.serializeArray = function() {
var result = [], el
var el, type, result = []
$([].slice.call(this.get(0).elements)).each(function(){
el = $(this)
var type = el.attr('type')
type = el.attr('type')
if (this.nodeName.toLowerCase() != 'fieldset' &&
!this.disabled && type != 'submit' && type != 'reset' && type != 'button' &&
((type != 'radio' && type != 'checkbox') || this.checked))
Expand Down

0 comments on commit 027a620

Please sign in to comment.