Skip to content

Instantly share code, notes, and snippets.

@hub-cap
Created June 9, 2014 17:24
Show Gist options
  • Save hub-cap/14cffe77878213f03ac0 to your computer and use it in GitHub Desktop.
Save hub-cap/14cffe77878213f03ac0 to your computer and use it in GitHub Desktop.
Assume
----
Blah.prototype.somefunc(cb) {
cb()
}
Working
----
function Blah() {
var self = this;
dnode({
blah: function(cb) { self.somefunc(cb) } <-- key line to look at
});
}
Not working
----------
function Blah() {
var self = this;
dnode({
blah: self.somefunc, <-- key line to look at
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment