mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2026-03-26 07:01:46 +00:00
fix: use default value got undefined value in payload (#772)
Signed-off-by: Andy Lee <andy.lee@suse.com>
This commit is contained in:
parent
8083a41df0
commit
ad3decf71f
@ -45,8 +45,8 @@ export default {
|
||||
|
||||
const cpu = { ...this.resources?.cpu };
|
||||
|
||||
if (cpu.v1 !== null) cpu.v1 = String(cpu.v1);
|
||||
if (cpu.v2 !== null) cpu.v2 = String(cpu.v2);
|
||||
if (cpu.v1 !== null && cpu.v1 !== undefined) cpu.v1 = String(cpu.v1);
|
||||
if (cpu.v2 !== null && cpu.v2 !== undefined) cpu.v2 = String(cpu.v2);
|
||||
|
||||
this.value.value = JSON.stringify({ ...this.resources, cpu });
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user