Skip to content

Commit 15a4f19

Browse files
committed
fix: disable hawk catcher if there isn't a token
1 parent 19da4d2 commit 15a4f19

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

src/index.js

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,14 @@ const CARDS_QUERY = require('./queries/cards');
4848
const ISSUE_QUERY = require('./queries/issue');
4949
const PR_QUERY = require('./queries/pr');
5050

51-
/**
52-
* Initialize HawkCatcher.
53-
*/
54-
HawkCatcher.init({
55-
token: HAWK_TOKEN,
56-
context: {
57-
myOwnDebugInfo: '1234',
58-
},
59-
});
51+
if (HAWK_TOKEN) {
52+
/**
53+
* Initialize HawkCatcher.
54+
*/
55+
HawkCatcher.init({
56+
token: HAWK_TOKEN,
57+
});
58+
}
6059

6160
/**
6261
* Request the GraphQL API of Github with passed query and param.

0 commit comments

Comments
 (0)