@telestack/db-sdk 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +4 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -428,7 +428,10 @@ export class Query {
|
|
|
428
428
|
if (!centrifuge)
|
|
429
429
|
return () => { };
|
|
430
430
|
const channel = `collection:${this.path.replace(/\//g, '_')}`;
|
|
431
|
-
|
|
431
|
+
let sub = centrifuge.getSubscription(channel);
|
|
432
|
+
if (!sub) {
|
|
433
|
+
sub = centrifuge.newSubscription(channel);
|
|
434
|
+
}
|
|
432
435
|
const debouncedCallback = () => {
|
|
433
436
|
if (this.debounceTimer)
|
|
434
437
|
clearTimeout(this.debounceTimer);
|