mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-09-17 14:21:29 +00:00
[MNT-22051] - Fix form field mapping when value is zero (#6517)
* [MNT-22051] - Fix form field mapping when value is zero * PR changes * add validation for null
This commit is contained in:
@@ -23,7 +23,11 @@ export class TaskVariableCloud {
|
||||
constructor(obj) {
|
||||
this.id = obj.name || null;
|
||||
this.name = obj.name || null;
|
||||
this.value = obj.value || null;
|
||||
this.value = this.hasValue(obj) ? obj.value : null;
|
||||
this.type = obj.type || null;
|
||||
}
|
||||
|
||||
hasValue(obj: TaskVariableCloud): boolean {
|
||||
return typeof obj.value !== undefined && obj.value !== null;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user