diff --git a/index.js b/index.js index 0bb1a2f..045310b 100644 --- a/index.js +++ b/index.js @@ -92,7 +92,7 @@ function _cleanObject(obj) { cleanedArray.push(_cleanObject(elt)); } return cleanedArray; - } else if (typeof obj === "object") { + } else if (typeof obj === "object" && obj !== null) { // Remove all of the array-style keys, and clean the values for the non array-style keys. const cleanedObject = {};