Skip to content

Commit

Permalink
Rename the _promise variable used in Transport since it conflicts wit…
Browse files Browse the repository at this point in the history
…h that in Deferrable and makes EventSource stop working.
  • Loading branch information
jcoglan committed Jun 25, 2016
1 parent ccc84cd commit 56d0ca4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/transport/transport.js
Expand Up @@ -57,7 +57,7 @@ var Transport = extend(Class({ className: 'Transport',
_makePromise: function() {
var self = this;

this._promise = this._promise || new Promise(function(resolve) {
this._requestPromise = this._requestPromise || new Promise(function(resolve) {
self._resolvePromise = resolve;
});
},
Expand All @@ -67,10 +67,10 @@ var Transport = extend(Class({ className: 'Transport',

this.addTimeout('publish', delay, function() {
this._flush();
delete this._promise;
delete this._requestPromise;
}, this);

return this._promise;
return this._requestPromise;
},

_flush: function() {
Expand Down

0 comments on commit 56d0ca4

Please sign in to comment.