[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:
Aaron Bohy
2018-03-06 15:49:38 +01:00
parent 72b75028d7
commit 9ccda20764
@@ -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;