Skip to content

Commit 8ae8419

Browse files
author
Matt Lewis
committed
fix(universal): make the calendar work with universal (again)
fixes #408
1 parent 7948d74 commit 8ae8419

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/modules/common/click.directive.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ export class ClickDirective implements OnInit, OnDestroy {
2020

2121
ngOnInit(): void {
2222
const eventName: string =
23-
typeof window['Hammer'] !== 'undefined' ? 'tap' : 'click';
23+
typeof window !== 'undefined' && typeof window['Hammer'] !== 'undefined'
24+
? 'tap'
25+
: 'click';
2426
this.removeListener = this.renderer.listen(
2527
this.elm.nativeElement,
2628
eventName,

0 commit comments

Comments
 (0)