Skip to content

Commit

Permalink
Handle "on" or "observe" listener method
Browse files Browse the repository at this point in the history
Signed-off-by: Kris Zyp <kriszyp@gmail.com>
  • Loading branch information
kriszyp committed Jul 20, 2010
1 parent b7a6373 commit def2049
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/pintura.js
Expand Up @@ -70,7 +70,7 @@ exports.JsgiApp = JsgiApp;
var Connector = require("tunguska/connector").Connector;
exports.addConnection = exports.app.addConnection = function(connection){
Connector("local-workers", connection);
connection.on("message", function(message){
connection[connection.on ? "on" : "observe"]("message", function(message){
if(message.method && message.method !== "subscribe"){
exports.directApp(message);
}
Expand Down

0 comments on commit def2049

Please sign in to comment.