Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5e0cb85

Browse files
committed
Bugfix: the prototype was being restored incorrectly to the env object, as opposed to the original function.
1 parent 2330103 commit 5e0cb85

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tracing.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ var Tracing = (function() {
159159
copyOwnProperties(tracingFunc, env.original);
160160

161161
// If code modified the prototype we better keep that as well.
162-
env.prototype = tracingFunc.prototype;
162+
env.original.prototype = tracingFunc.prototype;
163163

164164
// Unset the trace.
165165
objectTraverser(fnName, env.original);

0 commit comments

Comments
 (0)