Skip to content

Commit 1018cbe

Browse files
committed
Merge pull request #45 from kuzzleio/subscribeBugFix
Offline subscription bug fix
2 parents b8c42c6 + f73c44e commit 1018cbe

File tree

5 files changed

+12
-14
lines changed

5 files changed

+12
-14
lines changed

dist/kuzzle.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2671,6 +2671,10 @@ KuzzleRoom.prototype.renew = function (filters, cb) {
26712671
filters = null;
26722672
}
26732673

2674+
if (filters) {
2675+
this.filters = filters;
2676+
}
2677+
26742678
/*
26752679
if not yet connected, register itself to the subscriptions list and wait for the
26762680
main Kuzzle object to renew once online
@@ -2681,7 +2685,6 @@ KuzzleRoom.prototype.renew = function (filters, cb) {
26812685
return this;
26822686
}
26832687

2684-
26852688
if (this.subscribing) {
26862689
this.queue.push({action: 'renew', args: [filters, cb]});
26872690
return this;
@@ -2695,10 +2698,6 @@ KuzzleRoom.prototype.renew = function (filters, cb) {
26952698
this.callback = cb;
26962699
this.kuzzle.subscriptions.pending[self.id] = self;
26972700

2698-
if (filters) {
2699-
this.filters = filters;
2700-
}
2701-
27022701
subscribeQuery.body = this.filters;
27032702
subscribeQuery = this.kuzzle.addHeaders(subscribeQuery, this.headers);
27042703

dist/kuzzle.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/kuzzle.min.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "kuzzle-sdk",
3-
"version": "1.3.6",
3+
"version": "1.3.7",
44
"description": "Official Javascript SDK for Kuzzle",
55
"author": "The Kuzzle Team <[email protected]>",
66
"repository": {

src/kuzzleRoom.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,10 @@ KuzzleRoom.prototype.renew = function (filters, cb) {
155155
filters = null;
156156
}
157157

158+
if (filters) {
159+
this.filters = filters;
160+
}
161+
158162
/*
159163
if not yet connected, register itself to the subscriptions list and wait for the
160164
main Kuzzle object to renew once online
@@ -165,7 +169,6 @@ KuzzleRoom.prototype.renew = function (filters, cb) {
165169
return this;
166170
}
167171

168-
169172
if (this.subscribing) {
170173
this.queue.push({action: 'renew', args: [filters, cb]});
171174
return this;
@@ -179,10 +182,6 @@ KuzzleRoom.prototype.renew = function (filters, cb) {
179182
this.callback = cb;
180183
this.kuzzle.subscriptions.pending[self.id] = self;
181184

182-
if (filters) {
183-
this.filters = filters;
184-
}
185-
186185
subscribeQuery.body = this.filters;
187186
subscribeQuery = this.kuzzle.addHeaders(subscribeQuery, this.headers);
188187

0 commit comments

Comments
 (0)