Merge pull request #2336 from automatisch/AUT-1415

feat: in slate deserialization preserve original null and numeric values
This commit is contained in:
Ali BARIN
2025-02-12 13:59:20 +01:00
committed by GitHub

View File

@@ -70,7 +70,25 @@ export const deserialize = (value, options, stepsWithVariables) => {
];
}
if (value === null || value === undefined || value === '')
if (typeof value === 'number') {
return [
{
type: 'paragraph',
children: [{ text: value.toString(), value }],
},
];
}
if (value === null) {
return [
{
type: 'paragraph',
children: [{ text: '', value }],
},
];
}
if (value === undefined || value === '')
return [
{
type: 'paragraph',