edit window: make response handling code path more robust

A 2xx error code doesn't necessarily mean we got data we can
dereference

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2022-02-16 07:57:54 +01:00
parent bfc6233d92
commit 4f5e2bd12b

View File

@ -222,7 +222,7 @@ Ext.define('Proxmox.window.Edit', {
method: 'GET',
success: function(response, opts) {
form.clearInvalid();
me.digest = response.result.digest || response.result.data.digest;
me.digest = response.result?.digest || response.result?.data?.digest;
if (successFn) {
successFn(response, opts);
} else {