Skip to content

Commit

Permalink
fix(universal): make the calendar work with universal (again)
Browse files Browse the repository at this point in the history
fixes #408
  • Loading branch information
Matt Lewis committed Jan 1, 2018
1 parent 7948d74 commit 8ae8419
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/modules/common/click.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ export class ClickDirective implements OnInit, OnDestroy {

ngOnInit(): void {
const eventName: string =
typeof window['Hammer'] !== 'undefined' ? 'tap' : 'click';
typeof window !== 'undefined' && typeof window['Hammer'] !== 'undefined'
? 'tap'
: 'click';
this.removeListener = this.renderer.listen(
this.elm.nativeElement,
eventName,
Expand Down

0 comments on commit 8ae8419

Please sign in to comment.