Skip to content

Commit

Permalink
Fix problematic patching behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
greenberga committed Oct 30, 2024
1 parent 875c9c8 commit aaf3763
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/signals/collectStacktrace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,6 @@ export const takeRecords = (function () {

const originalFuncToString = Function.prototype.toString;
const newFuncToString = function toString(this: unknown, ...args: unknown[]) {
if (isFunc(this)) {
return;
}
const patchedRef = isFunc(this) ? origPatchMap.get(this) : false;
const ref = this === newFuncToString ? originalFuncToString : patchedRef ? patchedRef : this;
return originalFuncToString.apply(ref, args as []);
Expand Down

0 comments on commit aaf3763

Please sign in to comment.