Skip to content

Commit 4a925f1

Browse files
committed
Fix getOrignalRequire
1 parent 360537e commit 4a925f1

File tree

5 files changed

+45
-5
lines changed

5 files changed

+45
-5
lines changed

benchmarks/api-discovery/package-lock.json

Lines changed: 11 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

benchmarks/shell-injection/package-lock.json

Lines changed: 11 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

benchmarks/sql-injection/package-lock.json

Lines changed: 11 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

library/agent/hooks/wrapRequire.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,5 +261,5 @@ function patchPackage(this: mod, id: string, originalExports: unknown) {
261261
* Returns the unwrapped require function.
262262
*/
263263
export function getOrignalRequire() {
264-
return originalRequire;
264+
return originalRequire || mod.prototype.require;
265265
}

sample-apps/http2/package-lock.json

Lines changed: 11 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)