Skip to content

EspoCRM – Open Source CRM Application

fix

Yuri Kuznetsov2624c15763bc
diff --git a/client/src/views/modals/select-records-with-categories.js b/client/src/views/modals/select-records-with-categories.js
index 03d627b3b2..19d83a8d23 100644
--- a/client/src/views/modals/select-records-with-categories.js
+++ b/client/src/views/modals/select-records-with-categories.js
@@ -70,7 +70,9 @@ class SelectRecordsWithCategoriesModalView extends SelectRecordsModal {
}
setup() {
- this.scope = this.entityType = this.options.scope || this.scope;
+ // noinspection JSUnresolvedReference
+ this.scope = this.entityType = this.options.scope || this.scope || this.options.entityType;
+
this.categoryScope = this.categoryScope || this.scope + 'Category';
this.categoryField = this.getMetadata().get(`scopes.${this.categoryScope}.categoryField`) || this.categoryField;