form: integer field: code cleanup in getSubmitData

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2022-11-07 14:56:49 +01:00
parent 60ed17bf96
commit 8df4bd63d7

View File

@ -11,11 +11,10 @@ Ext.define('Proxmox.form.field.Integer', {
step: 1, step: 1,
getSubmitData: function() { getSubmitData: function() {
let me = this, let me = this;
data = null, let data = null;
val;
if (!me.disabled && me.submitValue && !me.isFileUpload()) { if (!me.disabled && me.submitValue && !me.isFileUpload()) {
val = me.getSubmitValue(); let val = me.getSubmitValue();
if (val !== undefined && val !== null && val !== '') { if (val !== undefined && val !== null && val !== '') {
data = {}; data = {};
data[me.getName()] = val; data[me.getName()] = val;