Browse Source

Test if dynamictype cache values are undefined instead of false.

Otherwise the false values are ignored from the cache.
pull/288/merge
Sergi Almacellas Abellana 8 years ago
parent
commit
b04fc00d0d
  1. 2
      papaparse.js

2
papaparse.js

@ -202,7 +202,7 @@ @@ -202,7 +202,7 @@
_config.dynamicTyping = dynamicTyping;
_config.shouldApplyDynamicTyping = function(field) {
// Cache function values to avoid calling it for each row
if (_config.dynamicTypingFunction && !_config.dynamicTyping[field]) {
if (_config.dynamicTypingFunction && _config.dynamicTyping[field] === undefined) {
_config.dynamicTyping[field] = _config.dynamicTypingFunction(field);
}
return (_config.dynamicTyping[field] || _config.dynamicTyping) === true

Loading…
Cancel
Save