Skip to content

Commit

Permalink
fix(time-ago): typescript error
Browse files Browse the repository at this point in the history
  • Loading branch information
urish committed Oct 30, 2018
1 parent 484213e commit 2fa8df4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/time-ago.pipe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const momentConstructor = moment;

@Pipe({name: 'amTimeAgo', pure: false})
export class TimeAgoPipe implements PipeTransform, OnDestroy {
private currentTimer: number;
private currentTimer: number | null;

private lastTime: Number;
private lastValue: Date | moment.Moment;
Expand Down Expand Up @@ -55,6 +55,8 @@ export class TimeAgoPipe implements PipeTransform, OnDestroy {
this.currentTimer = null;
this.ngZone.run(() => this.cdRef.markForCheck());
}, timeToUpdate);
} else {
return null;
}
});
}
Expand Down

0 comments on commit 2fa8df4

Please sign in to comment.