Skip to content

Commit

Permalink
Fix proposed by @reduckted
Browse files Browse the repository at this point in the history
  • Loading branch information
Bartosz Antosik committed Jul 12, 2024
1 parent 3c4455b commit e04fa2f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/bindings.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,15 @@ var bindings = null;
var Spellchecker = null;

const loadBinary = function (baseName) {
const nodeFiles = glob.globSync(path.join(__dirname, `bin/${baseName}*${process.arch}*.node`));

const nodeFiles = glob.globSync(`bin/${baseName}*${process.arch}*.node`, {
cwd: __dirname,
});
var binding = null;

nodeFiles.forEach((file) => {
try {
if (binding == null) {
binding = require(file);
binding = require(path.join(__dirname, file));
if (SPELLRIGHT_DEBUG_OUTPUT) {
console.log('[spellright] Bindings: \"' + path.basename(file) + '\".');
}
Expand Down

0 comments on commit e04fa2f

Please sign in to comment.