Skip to content

Commit

Permalink
[Bug] trim string value before passing to type analyzer (#1503)
Browse files Browse the repository at this point in the history
Signed-off-by: Shan He <heshan0131@gmail.com>
  • Loading branch information
heshan0131 committed Jun 9, 2021
1 parent d35ad48 commit b662892
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/processors/data-processor.js
Expand Up @@ -180,7 +180,10 @@ export function getSampleForTypeAnalyze({fields, allData, sampleCount = 50}) {
sample[j][field] = null;
j++;
} else if (notNullorUndefined(allData[i][fieldIdx])) {
sample[j][field] = allData[i][fieldIdx];
sample[j][field] =
typeof allData[i][fieldIdx] === 'string'
? allData[i][fieldIdx].trim()
: allData[i][fieldIdx];
j++;
i++;
} else {
Expand Down

0 comments on commit b662892

Please sign in to comment.