Skip to content
This repository was archived by the owner on Aug 10, 2020. It is now read-only.

Commit 8454321

Browse files
authored
Merge pull request #5 from netlify/update-telem
Update telemetry validation
2 parents b6b43e3 + bd6840f commit 8454321

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/utils/telemetry/index.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,12 @@ function track(eventName, payload) {
7373
if (eventName.indexOf('cli:') === -1) {
7474
eventName = `cli:${eventName}`
7575
}
76-
76+
77+
const allowed = () => true
78+
// event 'cli:command' bypasses validation
79+
const isValid = (eventName === 'cli:command') ? allowed : isValidEventName
7780
// to ensure clean data, validate event name
78-
if (!isValidEventName(eventName, eventConfig)) {
81+
if (!isValid(eventName, eventConfig)) {
7982
return false
8083
}
8184

0 commit comments

Comments
 (0)