Browse Source

copy function will copy null primitive correctly now

pull/504/head
efossas 7 years ago
parent
commit
f833bb9a9a
  1. 2
      papaparse.js

2
papaparse.js

@ -1632,7 +1632,7 @@ @@ -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)

Loading…
Cancel
Save