From f833bb9a9aa9ce0cd28816fc57741923e90c4dec Mon Sep 17 00:00:00 2001 From: efossas Date: Thu, 3 May 2018 15:35:03 -0600 Subject: [PATCH] copy function will copy null primitive correctly now --- papaparse.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/papaparse.js b/papaparse.js index b7fa8db..4ee8de2 100755 --- a/papaparse.js +++ b/papaparse.js @@ -1632,7 +1632,7 @@ /** Makes a deep copy of an array or object (mostly) */ function copy(obj) { - if (typeof obj !== 'object') + if (typeof obj !== 'object' || obj === null) return obj; var cpy = obj instanceof Array ? [] : {}; for (var key in obj)