Files
wekan/server/lib/customNumberFormat.js
Lauri OjansivuandClaude Opus 4.8 98315c26cd Fix #2091: custom number field shows NaN when cleared after being set
A number-type Custom Field rendered the literal 'NaN' once its value was cleared.
The submit handler now stores '' instead of NaN for empty input, and a shared
formatNumberValue helper normalizes empty/null/non-numeric values to an empty
string for display. Helper unit-tested.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-20 19:17:01 +03:00

7 lines
419 B
JavaScript

// Pure, dependency-free helper for rendering custom-field number values (#2091).
// The implementation lives in /imports/lib/customNumberFormat.js (an isomorphic
// file) so client and server share identical logic. This module re-exports the
// pure function at the documented test path and is itself free of any
// Meteor/Mongo runtime dependency.
export { formatNumberValue } from '/imports/lib/customNumberFormat';