feat: in slate deserialization preserve original null and numeric values

This commit is contained in:
kasia.oczkowska
2025-02-06 08:39:35 +00:00
parent 586348039d
commit 060c36aeef

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',