From 639e8e3250dcf663323a3fed2a088a4c939c7f87 Mon Sep 17 00:00:00 2001 From: Darcy Laycock Date: Sun, 24 Jul 2011 13:38:30 +0800 Subject: [PATCH] Load History should use the correct method --- public/coffeescripts/pebble.coffee | 2 +- public/javascripts/pebble.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public/coffeescripts/pebble.coffee b/public/coffeescripts/pebble.coffee index d6d68ea..cf5854a 100644 --- a/public/coffeescripts/pebble.coffee +++ b/public/coffeescripts/pebble.coffee @@ -21,7 +21,7 @@ class Pebble watch: (channel, callback) -> @on channel, callback - @loadHistoryFor @, channel, => + @loadHistory @, channel, => @socket.on channel, (data) => @receive channel, data trigger: (name, args...) -> diff --git a/public/javascripts/pebble.js b/public/javascripts/pebble.js index b3c7694..ab589f7 100644 --- a/public/javascripts/pebble.js +++ b/public/javascripts/pebble.js @@ -33,7 +33,7 @@ }; Pebble.prototype.watch = function(channel, callback) { this.on(channel, callback); - return this.loadHistoryFor(this, channel, __bind(function() { + return this.loadHistory(this, channel, __bind(function() { return this.socket.on(channel, __bind(function(data) { return this.receive(channel, data); }, this));