Skip to content

Commit

Permalink
infra: blow up when missing event name
Browse files Browse the repository at this point in the history
  • Loading branch information
jakebolam committed Jan 27, 2019
1 parent f848614 commit a0c6e54
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/utils/Analytics.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ class Analytics {
}

track(eventName, metadata = {}) {
if (!eventName) {
throw new Error('Analytics missing event name')
}

const event = {
user_id: this.user,
event_type: eventName,
Expand Down

0 comments on commit a0c6e54

Please # to comment.