Skip to content

Commit

Permalink
Fix getOrignalRequire
Browse files Browse the repository at this point in the history
  • Loading branch information
timokoessler committed Sep 30, 2024
1 parent 360537e commit 4a925f1
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 5 deletions.
12 changes: 11 additions & 1 deletion benchmarks/api-discovery/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 11 additions & 1 deletion benchmarks/shell-injection/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 11 additions & 1 deletion benchmarks/sql-injection/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion library/agent/hooks/wrapRequire.ts
Original file line number Diff line number Diff line change
Expand Up @@ -261,5 +261,5 @@ function patchPackage(this: mod, id: string, originalExports: unknown) {
* Returns the unwrapped require function.
*/
export function getOrignalRequire() {
return originalRequire;
return originalRequire || mod.prototype.require;
}
12 changes: 11 additions & 1 deletion sample-apps/http2/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4a925f1

Please sign in to comment.