Merge pull request #905 from ahlinc/contrib/master
Fix hiding problems in ./build/Debug/tree_sitter_*_binding.node
This commit is contained in:
commit
c982d86556
1 changed files with 7 additions and 3 deletions
|
|
@ -1,10 +1,14 @@
|
|||
try {
|
||||
module.exports = require("./build/Release/tree_sitter_PARSER_NAME_binding");
|
||||
} catch (error) {
|
||||
try {
|
||||
module.exports = require("./build/Debug/tree_sitter_PARSER_NAME_binding");
|
||||
} catch (_) {
|
||||
if (error.code !== 'MODULE_NOT_FOUND')
|
||||
throw error
|
||||
else try {
|
||||
module.exports = require("./build/Debug/tree_sitter_PARSER_NAME_binding");
|
||||
} catch (error2) {
|
||||
if (error2.code === 'MODULE_NOT_FOUND')
|
||||
throw error
|
||||
throw error2
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue