Merge pull request #2336 from automatisch/AUT-1415
feat: in slate deserialization preserve original null and numeric values
This commit is contained in:
@@ -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 [
|
return [
|
||||||
{
|
{
|
||||||
type: 'paragraph',
|
type: 'paragraph',
|
||||||
|
|||||||
Reference in New Issue
Block a user