[DataSource] do not rely on a defer from the Promise constructor
This commit is contained in:
parent
1a29624c00
commit
9200a6f0c7
|
@ -144,7 +144,10 @@ define(function (require) {
|
|||
SourceAbstract.prototype.onError = function (handler) {
|
||||
var self = this;
|
||||
|
||||
return new PromiseEmitter(function (resolve, reject, defer) {
|
||||
return new PromiseEmitter(function (resolve, reject) {
|
||||
const defer = Promise.defer();
|
||||
defer.promise.then(resolve, reject);
|
||||
|
||||
errorHandlers.push({
|
||||
source: self,
|
||||
defer: defer
|
||||
|
|
Loading…
Reference in a new issue