Skip to content

Commit 5887978

Browse files
committed
fix: Fix toString usage for function
1 parent 30c0da4 commit 5887978

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/raven.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ Raven.prototype = {
367367
// Signal that this function has been wrapped already
368368
// for both debugging and to prevent it to being wrapped twice
369369
wrapped.__raven__ = true;
370-
wrapped.__inner__ = func;
370+
wrapped.__orig__ = func;
371371

372372
return wrapped;
373373
},
@@ -949,7 +949,7 @@ Raven.prototype = {
949949
// eslint-disable-next-line no-extend-native
950950
Function.prototype.toString = function() {
951951
if (typeof this === 'function' && this.__raven__) {
952-
return self._originalFunctionToString.apply(this.__orig_method__, arguments);
952+
return self._originalFunctionToString.apply(this.__orig__, arguments);
953953
}
954954
return self._originalFunctionToString.apply(this, arguments);
955955
};

src/utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ function fill(obj, name, replacement, track) {
358358
var orig = obj[name];
359359
obj[name] = replacement(orig);
360360
obj[name].__raven__ = true;
361-
obj[name].__orig_method__ = orig;
361+
obj[name].__orig__ = orig;
362362
if (track) {
363363
track.push([obj, name, orig]);
364364
}

0 commit comments

Comments
 (0)