Permalink
Browse files

closes #8

  • Loading branch information...
1 parent d0f9e52 commit 8e5057a2e8d85f7cc6f14d0bc1d93449fb982058 @olegp committed Jan 12, 2013
Showing with 3 additions and 3 deletions.
  1. +2 −2 lib/mongo-sync.js
  2. +1 −1 package.json
View
@@ -1,4 +1,4 @@
-if(!Fiber) require("fibers");
+var Fiber = global.Fiber || require("fibers");
var Mongolian = require("mongolian");
var MongolianDB = require("mongolian/lib/db");
var MongolianCollection = require("mongolian/lib/collection");
@@ -16,7 +16,7 @@ Function.prototype.sync = function(that, args) {
fiber.run(error || value);
});
this.apply(that, args);
- var result = yield();
+ var result = Fiber.yield();
if (result instanceof Error) {
throw new Error(result.message);
}
View
@@ -2,7 +2,7 @@
"name": "mongo-sync",
"keywords": ["mongodb"],
"description": "Synchronous MongoDB driver",
- "version": "0.1.2",
+ "version": "0.1.3",
"author": "Oleg Podsechin <oleg@ionsquare.com>",
"directories" : {
"lib" : "./lib"

0 comments on commit 8e5057a

Please sign in to comment.