Skip to content

Commit 3ab3025

Browse files
committed
Fix instrument()
1 parent 414288f commit 3ab3025

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

spec/stacktrace-spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ describe('StackTrace', function () {
109109
it('wraps given function and calls given callback when called', function(done) {
110110
function interestingFn() { return 'something'; }
111111
var wrapped = StackTrace.instrument(interestingFn, callback, done.fail);
112-
wrapped();
112+
expect(wrapped()).toBe('something');
113113

114114
function callback(stackFrames) {
115115
if (stackFrames[0].fileName) { // Work around IE9-

stacktrace.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@
127127
var instrumented = function StackTrace$$instrumented() {
128128
try {
129129
this.get().then(callback, errback)['catch'](errback);
130-
fn.apply(thisArg || this, arguments);
130+
return fn.apply(thisArg || this, arguments);
131131
} catch (e) {
132132
if (_isShapedLikeParsableError(e)) {
133133
this.fromError(e).then(callback, errback)['catch'](errback);

0 commit comments

Comments
 (0)