ui: form/GroupFilter: correctly resolve the reference cycle

'record[widget]' does not contain anything since the widgets are
in the 'widgets' property so delete that

we also have to remove the 'record' entry of the widget so that
the widget does not have a link to the record anymore

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Dominik Csapak 2021-12-01 11:57:06 +01:00 committed by Thomas Lamprecht
parent f66d814792
commit d0d970f70b

View File

@ -10,7 +10,8 @@ Ext.define('PBS.form.GroupFilter', {
removeReferences: function(record) {
for (const widget of Object.keys(record.widgets || {})) {
delete record[widget];
delete record.widgets[widget].record;
delete record.widgets[widget];
}
delete record.widgets;