log, journal view: fix access to me after destroying

it can happen that the view is destroyed during an api call, so we
should check if it's destroyed as the first thing in the callback

if the view is destroyed, there is nothing we can do here, so simply
return

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak 2022-11-21 08:53:42 +01:00 committed by Thomas Lamprecht
parent d13f97d6e3
commit ed6721d0ff
2 changed files with 6 additions and 0 deletions

View File

@ -143,6 +143,9 @@ Ext.define('Proxmox.panel.JournalView', {
waitMsgTarget: !livemode ? view : undefined,
method: 'GET',
success: function(response) {
if (me.isDestroyed) {
return;
}
Proxmox.Utils.setErrorMask(me, false);
let lines = response.result.data;
me.updateView(lines, livemode, top);

View File

@ -98,6 +98,9 @@ Ext.define('Proxmox.panel.LogView', {
params: viewModel.get('params'),
method: 'GET',
success: function(response) {
if (me.isDestroyed) {
return;
}
Proxmox.Utils.setErrorMask(me, false);
let total = response.result.total;
let lines = [];