Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Commit 058467e

Browse files
author
Parth Shah
committed
fixing unit tests
1 parent 60bc101 commit 058467e

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

app/submissions/submissions.controller.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,21 @@ import angular from 'angular'
55

66
angular.module('tc.submissions').controller('SubmissionsController', SubmissionsController)
77

8-
SubmissionsController.$inject = ['challengeToSubmitTo', '$state']
8+
SubmissionsController.$inject = ['challengeToSubmitTo', '$state', 'logger']
99

10-
function SubmissionsController(challengeToSubmitTo, $state) {
10+
function SubmissionsController(challengeToSubmitTo, $state, logger) {
1111
var vm = this
1212

1313
vm.error = !!challengeToSubmitTo.error
14+
// test to see if sentry logging works
1415
try {
16+
var a = null
1517
a[1].undef
1618
} catch (e) {
17-
console.log('Raven', window.Raven)
18-
window.Raven.captureException(e)
19-
console.log(window.Raven.lastEventId())
19+
if (window.Raven) {
20+
window.Raven.captureException(e)
21+
logger.debug(window.Raven.lastEventId())
22+
}
2023
}
2124
if (vm.error) {
2225
vm.errorType = challengeToSubmitTo.error.type

0 commit comments

Comments
 (0)