Skip to content

Commit e35bc88

Browse files
author
Travis CI
committed
Travis CI - [ci skip] - automatic dist folder
1 parent 7cc9d03 commit e35bc88

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

dist/kuzzle.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2663,13 +2663,18 @@ KuzzleRoom.prototype.count = function (cb) {
26632663
var data;
26642664

26652665
this.kuzzle.callbackRequired('KuzzleRoom.count', cb);
2666+
26662667
data = this.kuzzle.addHeaders({body: {roomId: this.roomId}}, this.headers);
26672668

26682669
if (this.subscribing) {
26692670
this.queue.push({action: 'count', args: [cb]});
26702671
return this;
26712672
}
26722673

2674+
if (!this.roomId) {
2675+
throw new Error('KuzzleRoom.count: cannot count subscriptions on an inactive room');
2676+
}
2677+
26732678
this.kuzzle.query(this.collection.buildQueryArgs('subscribe', 'count'), data, function (err, res) {
26742679
if (err) {
26752680
return cb(err);
@@ -2702,6 +2707,8 @@ KuzzleRoom.prototype.renew = function (filters, cb) {
27022707
filters = null;
27032708
}
27042709

2710+
self.kuzzle.callbackRequired('KuzzleRoom.renew', cb);
2711+
27052712
/*
27062713
Skip subscription renewal if another one was performed a moment before
27072714
*/
@@ -2728,8 +2735,6 @@ KuzzleRoom.prototype.renew = function (filters, cb) {
27282735
return self;
27292736
}
27302737

2731-
self.kuzzle.callbackRequired('KuzzleRoom.renew', cb);
2732-
27332738
self.unsubscribe();
27342739
self.roomId = null;
27352740
self.subscribing = true;

0 commit comments

Comments
 (0)