Skip to content

Commit

Permalink
preserve dates as strings in JSON file
Browse files Browse the repository at this point in the history
Other values also taken as strings as well.  This is a result of user "save as ...." option.
  • Loading branch information
Damion Dooley committed Sep 7, 2022
1 parent d8ccbca commit 4d8f36d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion lib/DataHarmonizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -1895,7 +1895,6 @@ class DataHarmonizer {
for (let row in matrix) {
// NOTE: row is string! Adding offsets requires parseInt(row)
const hotRowPtr = parseInt(row); // + rowOffset;
console.log('row', row, hotRowPtr);
const hotRowBinCol = parseInt(col) + binOffset;
const hotRowNextCol = parseInt(col) + 1;
const value = matrix[row][col];
Expand Down
2 changes: 1 addition & 1 deletion lib/Toolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ class Toolbar {
const baseName = $('#base-name-save-as-input').val();
const ext = $('#file-ext-save-as-select').val();
if (ext == 'json') {
let data = dh.getDataObjects();
let data = dh.getDataObjects(false);
dh.runBehindLoadingScreen(exportJsonFile, [data, baseName, ext]);
} else {
let matrix = [...dh.getFlatHeaders(), ...dh.getTrimmedData()];
Expand Down

0 comments on commit 4d8f36d

Please sign in to comment.