Skip to content

Commit

Permalink
Fixed a bug about JSON parse
Browse files Browse the repository at this point in the history
  • Loading branch information
hsnaydd committed Jul 16, 2014
1 parent 27e21b9 commit d967a39
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/validetta.js
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@
// cache xhr
this.xhr[ fieldName ] = $.ajax( ajaxOptions )
.done( function( result ) {
result = JSON.parse( result );
if( typeof result !== 'object' ) result = JSON.parse( result );
cache.state = 'resolved';
cache.result = result;
if ( cache.event === 'submit' ) {
Expand Down

0 comments on commit d967a39

Please sign in to comment.