@mtgame/core 0.2.45 → 0.2.46

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.
@@ -13612,9 +13612,8 @@
13612
13612
  CentrifugoService.prototype.listen = function (channel) {
13613
13613
  var _this = this;
13614
13614
  if (!common.isPlatformBrowser(this.platformId)) {
13615
- return new rxjs.Observable(function (observer) {
13616
- observer.error('Centrifugo is not available in ssr mode');
13617
- });
13615
+ console.error('Centrifugo is not available in ssr mode');
13616
+ return new rxjs.Observable(function (observer) { });
13618
13617
  }
13619
13618
  if (channel in this.channels$) {
13620
13619
  return this.channels$[channel];
@@ -13639,9 +13638,8 @@
13639
13638
  CentrifugoService.prototype.connect = function () {
13640
13639
  var _this = this;
13641
13640
  if (!common.isPlatformBrowser(this.platformId)) {
13642
- return new rxjs.Observable(function (observer) {
13643
- observer.error('Centrifugo is not available in ssr mode');
13644
- });
13641
+ console.error('Centrifugo is not available in ssr mode');
13642
+ return new rxjs.Observable(function (observer) { });
13645
13643
  }
13646
13644
  if (!this.initializeEngineSubject) {
13647
13645
  this.initializeEngineSubject = new rxjs.ReplaySubject(1);
@@ -13668,15 +13666,16 @@
13668
13666
  CentrifugoService.prototype.publish = function (channel, message) {
13669
13667
  var _this = this;
13670
13668
  if (!common.isPlatformBrowser(this.platformId)) {
13671
- return new rxjs.Observable(function (observer) {
13672
- observer.error('Centrifugo is not available in ssr mode');
13673
- });
13669
+ console.error('Centrifugo is not available in ssr mode');
13670
+ return new rxjs.Observable(function (observer) { });
13674
13671
  }
13675
13672
  return this.connect().pipe(operators.tap(function () { return _this.centrifuge.publish(channel, message); }));
13676
13673
  };
13677
13674
  CentrifugoService.prototype.disconnect = function () {
13678
13675
  var e_1, _a;
13679
- this.centrifuge.disconnect();
13676
+ if (this.centrifuge) {
13677
+ this.centrifuge.disconnect();
13678
+ }
13680
13679
  this.initializeEngineSubject = undefined;
13681
13680
  try {
13682
13681
  for (var _b = __values(Object.keys(this.channels$)), _c = _b.next(); !_c.done; _c = _b.next()) {