Skip to content

Commit aa43e0e

Browse files
[DSC-1831] used BrowserOnlyDirective to check from template
1 parent d22e707 commit aa43e0e

2 files changed

Lines changed: 2 additions & 10 deletions

File tree

src/app/shared/context-menu/context-menu.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div class="d-flex space-children-mr justify-content-end" *ngIf="browserPlatform && contextMenuObject">
1+
<div class="d-flex space-children-mr justify-content-end" dsRenderOnlyForBrowser>
22
<ng-container *ngFor="let entry of (getStandAloneMenuEntries() | async)">
33
<ng-container *ngComponentOutlet="entry; injector: objectInjector;"></ng-container>
44
</ng-container>

src/app/shared/context-menu/context-menu.component.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,6 @@ export class ContextMenuComponent implements OnInit {
4848
*/
4949
public optionCount = 0;
5050

51-
/**
52-
* Flag to check csr rendering
53-
*/
54-
browserPlatform = false;
55-
5651
/**
5752
* Initialize instance variables
5853
*
@@ -63,13 +58,10 @@ export class ContextMenuComponent implements OnInit {
6358
*/
6459
constructor(
6560
@Inject(DOCUMENT) private _document: Document,
66-
@Inject(PLATFORM_ID) protected platformId: Object,
6761
private cdr: ChangeDetectorRef,
6862
private configurationService: ConfigurationDataService,
6963
private injector: Injector
70-
) {
71-
this.browserPlatform = isPlatformBrowser(this.platformId);
72-
}
64+
) { }
7365

7466
ngOnInit(): void {
7567
this.objectInjector = Injector.create({

0 commit comments

Comments
 (0)