Skip to content

Commit

Permalink
fix: properly serialize undefined values (#7497)
Browse files Browse the repository at this point in the history
  • Loading branch information
suneettipirneni committed Feb 20, 2022
1 parent 942ea1a commit 8dbd345
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/discord.js/src/util/Transformers.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class Transformers extends null {
* @param {*} obj The object to transform
* @returns {*}
*/
static toSnakeCase(obj = {}) {
static toSnakeCase(obj) {
if (typeof obj !== 'object' || !obj) return obj;
if (Array.isArray(obj)) return obj.map(Transformers.toSnakeCase);
return Object.fromEntries(
Expand Down

0 comments on commit 8dbd345

Please sign in to comment.