Skip to content

Commit

Permalink
Serialize null correctly.
Browse files Browse the repository at this point in the history
  • Loading branch information
scotthovestadt committed Feb 11, 2017
1 parent af73d2c commit 75f0cab
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/gigya.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ export class Gigya {
// Gigya wants arrays and objects stringified into JSON, eg Account profile and data objects.
if (value && (_.isObject(value) || _.isArray(value))) {
return JSON.stringify(value);
} else if (value === null) {
return 'null';
} else {
return value;
}
Expand Down

0 comments on commit 75f0cab

Please sign in to comment.