Browse Source

Ticket #4369 - New PUSH server integration: Remake.

AntonLV 3 years ago
parent
commit
c2c583161c
3 changed files with 3 additions and 3 deletions
  1. 1 1
      inc/js/classes/BxDolCmts.js
  2. 1 1
      inc/js/classes/BxDolScore.js
  3. 1 1
      inc/js/classes/BxDolVote.js

+ 1 - 1
inc/js/classes/BxDolCmts.js

@@ -42,7 +42,7 @@ BxDolCmts.prototype.cmtInit = function()
 
     $(document).ready(function() {
         // init socket
-        if(oBxDolSockets && $this._sSocket)
+        if(window.oBxDolSockets !== undefined && $this._sSocket)
             oBxDolSockets.subscribe($this._sSocket, $this._iObjId, 'comment_added', function(oData) {
                 $this.cmtUpdateCounterAs(oData);
                 $this.showLiveUpdateForSocket(oData);

+ 1 - 1
inc/js/classes/BxDolScore.js

@@ -35,7 +35,7 @@ BxDolScore.prototype.init = function()
 {
     var $this = this; 
     $(document).ready(function() {
-        if(oBxDolSockets && $this._sSocket)
+        if(window.oBxDolSockets !== undefined && $this._sSocket)
             oBxDolSockets.subscribe($this._sSocket, $this._iObjId, 'voted', function(oData) {
                 $this.onVoteAs(oData);
             });

+ 1 - 1
inc/js/classes/BxDolVote.js

@@ -36,7 +36,7 @@ BxDolVote.prototype.init = function()
 {
     var $this = this; 
     $(document).ready(function() {
-        if(oBxDolSockets && $this._sSocket)
+        if(window.oBxDolSockets !== undefined && $this._sSocket)
             oBxDolSockets.subscribe($this._sSocket, $this._iObjId, 'voted', function(oData) {
                 $this.onVoteAs(oData);
             });