Browse Source

Better recognition of node commonJS

resolves #391, tested with chrome, LTS node (6.10.3) and current node (8.0.0)
pull/393/head
Svante 8 years ago committed by Sergi Almacellas Abellana
parent
commit
a817849947
  1. 2
      papaparse.js

2
papaparse.js

@ -11,7 +11,7 @@ @@ -11,7 +11,7 @@
// AMD. Register as an anonymous module.
define([], factory);
}
else if (typeof module === 'object' && module.exports)
else if (typeof module === 'object' && typeof exports !== 'undefined')
{
// Node. Does not work with strict CommonJS, but
// only CommonJS-like environments that support module.exports,

Loading…
Cancel
Save