[manager,webapp]fix 页面全局监控搜索结果异常 (#28)

This commit is contained in:
tomsun28
2022-03-15 15:00:22 +08:00
committed by GitHub
parent 9eb3b9842d
commit 540f4bcbf4
3 changed files with 21 additions and 6 deletions

View File

@@ -96,7 +96,11 @@ export class HeaderSearchComponent implements AfterViewInit, OnDestroy {
searchMonitors$.unsubscribe();
if (message.code === 0) {
let page = message.data;
this.options = page.content;
if (page.content != undefined) {
this.options = page.content;
} else {
this.options = [];
}
this.cdr.detectChanges();
} else {
console.warn(message.msg);
@@ -118,7 +122,7 @@ export class HeaderSearchComponent implements AfterViewInit, OnDestroy {
qBlur(): void {
this.focus = false;
this.searchToggled = false;
this.options.length = 0;
this.options = [];
this.toggleChangeChange.emit(false);
}