Skip to content

Commit 5fe08ff

Browse files
committed
Fix adding changed handler on observer creator
1 parent 3811e0f commit 5fe08ff

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/ddp-client.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -501,10 +501,10 @@ DDPClient.prototype.unsubscribe = function(id) {
501501
/**
502502
* Adds an observer to a collection and returns the observer.
503503
* Observation can be stopped by calling the stop() method on the observer.
504-
* Functions for added, updated and removed can be added to the observer
504+
* Functions for added, changed and removed can be added to the observer
505505
* afterward.
506506
*/
507-
DDPClient.prototype.observe = function(name, added, updated, removed) {
507+
DDPClient.prototype.observe = function(name, added, changed, removed) {
508508
var self = this;
509509
var observer = {};
510510
var id = self._getNextId();
@@ -518,7 +518,7 @@ DDPClient.prototype.observe = function(name, added, updated, removed) {
518518
Object.defineProperty(observer, "_id", { get: function() { return id; }});
519519

520520
observer.added = added || function(){};
521-
observer.updated = updated || function(){};
521+
observer.changed = changed || function(){};
522522
observer.removed = removed || function(){};
523523

524524
observer.stop = function() {

0 commit comments

Comments
 (0)