Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix odbc_bindings.node requiring in odbc.js

  • Loading branch information...
commit add05e32d09f8943b82ff8da91e34058e3b1b537 1 parent 17755f3
@Sannis Sannis authored
Showing with 11 additions and 1 deletion.
  1. +11 −1 odbc.js
View
12 odbc.js
@@ -14,7 +14,17 @@
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-var odbc = require("./odbc_bindings");
+var odbc;
+
+try {
+ odbc = require("./odbc_bindings");
+} catch (e) {
+ try {
+ odbc = require("./build/default/odbc_bindings");
+ } catch (e) {
+ odbc = require("./build/Release/odbc_bindings");
+ }
+}
var Database = exports.Database = function () {
var self = this;
Please sign in to comment.
Something went wrong with that request. Please try again.