Permalink
Browse files

Only call the orginal method once

  • Loading branch information...
raymondfeng committed Apr 17, 2013
1 parent 3eb6869 commit ad1b2ad7e9e8335fe9a926efdccab2bd3456df3e
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/model.js
View
@@ -260,7 +260,7 @@ function stillConnecting(schema, obj, args) {
if (schema.connected) return false;
if (schema.connecting) return true;
var method = args.callee;
- schema.on('connected', function () {
+ schema.once('connected', function () {
method.apply(obj, [].slice.call(args));
});
schema.connect();

0 comments on commit ad1b2ad

Please sign in to comment.