mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
(core) make ValueFormatter.format honor its return type
Summary: make ValueFormatter.format honor its return type Test Plan: existing tests pass Reviewers: dsagal Reviewed By: dsagal Subscribers: dsagal Differential Revision: https://phab.getgrist.com/D2663
This commit is contained in:
parent
f1842cd89e
commit
ab01ce495d
@ -56,7 +56,7 @@ export class BaseFormatter {
|
|||||||
* classes to handle values in formatter-specific ways.
|
* classes to handle values in formatter-specific ways.
|
||||||
*/
|
*/
|
||||||
public format(value: any): string {
|
public format(value: any): string {
|
||||||
return value;
|
return String(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -105,7 +105,7 @@ function makeCSV(activeDoc, viewSectionId, sortOrder, req) {
|
|||||||
rowIds.forEach(row => {
|
rowIds.forEach(row => {
|
||||||
csvMatrix.push(access.map((getter, c) => formatters[c].formatAny(getter(row))));
|
csvMatrix.push(access.map((getter, c) => formatters[c].formatAny(getter(row))));
|
||||||
});
|
});
|
||||||
return csv.stringifyAsync(csvMatrix, {formatters: {bool: v => '' + Number(v)}});
|
return csv.stringifyAsync(csvMatrix);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
exports.makeCSV = makeCSV;
|
exports.makeCSV = makeCSV;
|
||||||
|
Loading…
Reference in New Issue
Block a user