Skip to content

Commit

Permalink
Make Monitoring.event so it doesn't fail if monitoring was not inited.
Browse files Browse the repository at this point in the history
  • Loading branch information
Misterblue committed Nov 14, 2020
1 parent 356b273 commit f9651d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Monitoring/Monitoring.ts
Expand Up @@ -54,7 +54,7 @@ export const Monitoring = {
// This allows stats to be optional because the caller doesn't need to
// know if the stat exists.
event(pEventName: string, pCount: number = 1): void {
const theStat = _statistics.get(pEventName);
const theStat = _statistics?.get(pEventName);
if (theStat) {
theStat.Event(pCount);
};
Expand Down

0 comments on commit f9651d2

Please sign in to comment.