diff --git a/src/app/shared/context-menu/context-menu.component.html b/src/app/shared/context-menu/context-menu.component.html index 15a0075da46..70c948a3b42 100644 --- a/src/app/shared/context-menu/context-menu.component.html +++ b/src/app/shared/context-menu/context-menu.component.html @@ -2,7 +2,8 @@ -
+
@@ -11,9 +12,6 @@ -
diff --git a/src/app/shared/context-menu/context-menu.component.ts b/src/app/shared/context-menu/context-menu.component.ts index 7afd565b67c..0de17f9d00b 100644 --- a/src/app/shared/context-menu/context-menu.component.ts +++ b/src/app/shared/context-menu/context-menu.component.ts @@ -133,10 +133,12 @@ export class ContextMenuComponent implements OnInit { ngAfterViewChecked() { // To check that Context-menu contains options or not - const el = Array.from(document.getElementById('itemOptionsDropdownMenu').getElementsByClassName('ng-star-inserted')); + const el = Array.from(document.getElementById('itemOptionsDropdownMenu')?.getElementsByClassName('ng-star-inserted')); this.optionCount = 0; - el.forEach(element => { - this.optionCount += element.childElementCount; - }); + if (el) { + el.forEach(element => { + this.optionCount += element.childElementCount; + }); + } } } diff --git a/src/assets/i18n/en.json5 b/src/assets/i18n/en.json5 index a4049953137..d49002e527c 100644 --- a/src/assets/i18n/en.json5 +++ b/src/assets/i18n/en.json5 @@ -1415,8 +1415,6 @@ "context-menu.actions.label": "Options", - "context-menu.actions.no-options-available": "No Options Available", - "context-menu.actions.edit-item.btn.FULL": "Edit all the details", "context-menu.actions.edit-item.btn.OWNER": "Edit",