Skip to content
Snippets Groups Projects
Verified Commit 6e75f3c9 authored by Alex ORLUC's avatar Alex ORLUC
Browse files

FEAT #11271 TIME 0:05 fix if no model

parent 503cbdea
No related branches found
No related tags found
No related merge requests found
......@@ -65,11 +65,14 @@ export class IndexationComponent implements OnInit {
this.http.get("../../rest/indexingModels").pipe(
tap((data: any) => {
this.indexingModels = data.indexingModels;
this.currentIndexingModel = this.indexingModels.filter(model => model.default === true)[0];
if (this.currentIndexingModel === undefined) {
this.currentIndexingModel = this.indexingModels[0];
this.notify.error(this.lang.noDefaultIndexingModel);
if(this.indexingModels.length > 0) {
this.currentIndexingModel = this.indexingModels.filter(model => model.default === true)[0];
if (this.currentIndexingModel === undefined) {
this.currentIndexingModel = this.indexingModels[0];
this.notify.error(this.lang.noDefaultIndexingModel);
}
}
if (this.appService.getViewMode()) {
setTimeout(() => {
this.sidenavLeft.open();
......
......@@ -18,6 +18,7 @@ import { PDFProgressData } from 'ng2-pdf-viewer';
templateUrl: "document-viewer.component.html",
styleUrls: [
'document-viewer.component.scss',
'../indexation/indexing-form/indexing-form.component.scss',
],
providers: [NotificationService, AppService, SortPipe]
})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment