Skip to content

Commit 1ea5d92

Browse files
committed
allow bson from node_modules to use Buffer
1 parent 72896ad commit 1ea5d92

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

test/tools/runner/vm_runner.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ function loadInSandbox(filepath: string) {
120120
}
121121

122122
// js-bson is allowed to use Buffer, only ./src/ is not
123-
const isSourceFile = realPath.includes('/src/') || !realPath.includes('node_modules');
123+
const isSourceFile = realPath.includes('/src/') && !realPath.includes('node_modules');
124124
const isTestFile = realPath.includes('.test.ts') || realPath.includes('.test.js');
125125

126126
let localBuffer = Buffer;

0 commit comments

Comments
 (0)