Created
June 9, 2014 17:24
-
-
Save hub-cap/14cffe77878213f03ac0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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