Skip to content

Commit

Permalink
fix: throw if no debug
Browse files Browse the repository at this point in the history
  • Loading branch information
durran committed Feb 7, 2025
1 parent 896b569 commit 3d173cc
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@ function load() {
try {
return require('../build/Release/mongocrypt.node');
} catch {
// eslint-disable-next-line no-console
console.log('Could not load the native module mongocrypt.node');
try {
return require('../build/Debug/mongocrypt.node');
} catch {
throw new Error('Could not load the native module mongocrypt.node');
}
}
}

Expand Down

0 comments on commit 3d173cc

Please sign in to comment.