Skip to content

Commit

Permalink
Don't assume value 1 is boolean, use the pods-boolean class
Browse files Browse the repository at this point in the history
3.0-unstable version of pods-framework#2397
  • Loading branch information
jamesgol committed Nov 3, 2014
1 parent 6b6f2c0 commit 187198e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ui/js/jquery.pods.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
var val = $el.val();

if ( $el.is( 'input[type=checkbox]' ) && !$el.is( ':checked' ) ) {
if ( 1 == val )
if ( $el.is( '.pods-boolean' ) )
val = 0;
else
return true; // This input isn't a boolean, continue the loop
Expand Down Expand Up @@ -1783,4 +1783,4 @@
$.error( 'Method ' + method + ' does not exist on jQuery.Pods' );
}
};
} )( jQuery );
} )( jQuery );

0 comments on commit 187198e

Please sign in to comment.