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 for truthy not for null

Bruno Pagnoab4501dd0f29
diff --git a/frontend/src/app/shared/components/autocompleter/op-autocompleter/op-autocompleter.component.html b/frontend/src/app/shared/components/autocompleter/op-autocompleter/op-autocompleter.component.html
index 26deec10a6e..6c0a78b5676 100644
--- a/frontend/src/app/shared/components/autocompleter/op-autocompleter/op-autocompleter.component.html
+++ b/frontend/src/app/shared/components/autocompleter/op-autocompleter/op-autocompleter.component.html
@@ -134,7 +134,7 @@
</div>
<ng-template let-item let-search="search" #defaultOption [ngSwitch]="true">
- <ng-container *ngSwitchCase="!resource && item.depth !== null">
+ <ng-container *ngSwitchCase="!resource && !!item.depth">
<span [ngOptionHighlight]="search"
[textContent]="item.name"
[ngStyle]="{'padding-left.px': item.depth * 16}"
@@ -203,7 +203,7 @@
</ng-container>
<ng-container
- *ngSwitchCase="resource ==='subproject' || resource ==='version' || resource ==='status' || resource ==='default' || (!resource && item.depth === null)">
+ *ngSwitchCase="resource ==='subproject' || resource ==='version' || resource ==='status' || resource ==='default' || (!resource && !item.depth)">
<span [ngOptionHighlight]="search">{{ item.name }}</span>
<span
class="op-autocompleter__option-principal-email"