Fallback to using the debug build (#42)
Add fallback to load the debug build
This commit is contained in:
Родитель
d5e74b6ba6
Коммит
0f8cb001fd
7
index.js
7
index.js
|
@ -12,7 +12,12 @@ NativeBinding.prototype._init = function() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this._tried = true;
|
this._tried = true;
|
||||||
this._keymapping = require('./build/Release/keymapping');
|
try {
|
||||||
|
this._keymapping = require('./build/Release/keymapping');
|
||||||
|
} catch (err) {
|
||||||
|
// fallback to the debug build
|
||||||
|
this._keymapping = require('./build/Debug/keymapping');
|
||||||
|
}
|
||||||
};
|
};
|
||||||
NativeBinding.prototype.getKeyMap = function() {
|
NativeBinding.prototype.getKeyMap = function() {
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "native-keymap",
|
"name": "native-keymap",
|
||||||
"version": "3.3.0",
|
"version": "3.3.1",
|
||||||
"description": "Get OS key mapping",
|
"description": "Get OS key mapping",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"typings": "index.d.ts",
|
"typings": "index.d.ts",
|
||||||
|
|
Загрузка…
Ссылка в новой задаче