Permalink
Browse files

Fix odbc_bindings.node requiring in odbc.js

  • Loading branch information...
Sannis committed Apr 18, 2012
1 parent 17755f3 commit add05e32d09f8943b82ff8da91e34058e3b1b537
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;

0 comments on commit add05e3

Please sign in to comment.