Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

check if the quesry exists then use it for a condition

bsatarnejad767afd19f0c1
diff --git a/frontend/src/app/shared/directives/search-highlight.directive.ts b/frontend/src/app/shared/directives/search-highlight.directive.ts
index 210ad2bd92f..5060b9d0a53 100644
--- a/frontend/src/app/shared/directives/search-highlight.directive.ts
+++ b/frontend/src/app/shared/directives/search-highlight.directive.ts
@@ -17,7 +17,7 @@ export class OpSearchHighlightDirective implements AfterViewChecked {
let el = this.elementRef.nativeElement as HTMLElement;
const highlightedElement = el.querySelector('.op-search-highlight');
- if (!!highlightedElement && highlightedElement.innerHTML.toLocaleLowerCase() === this.query.toLocaleLowerCase()) {
+ if (!!highlightedElement && this.query && highlightedElement.innerHTML.toLocaleLowerCase() === this.query.toLocaleLowerCase()) {
return;
}