[FIX] web: BasicView: prevent crash in tests
A crash occured in several Studio tests that have just been
forwardported to saas-11.2, because of a line that hadn't been
adapted in rev. cb339842 (technically, the previous code was
correct, but it crashed when viewInfo.fields was undefined, which
doesn't happen outside the tests environment).
This commit is contained in:
@@ -45,7 +45,7 @@ var BasicView = AbstractView.extend({
|
||||
this.rendererParams.viewType = this.viewType;
|
||||
|
||||
this.controllerParams.confirmOnDelete = true;
|
||||
this.controllerParams.archiveEnabled = 'active' in viewInfo.fields;
|
||||
this.controllerParams.archiveEnabled = 'active' in this.fields;
|
||||
this.controllerParams.hasButtons =
|
||||
'action_buttons' in params ? params.action_buttons : true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user