|
|
@@ -1897,15 +1897,15 @@ if (!window.Promise){
|
|
|
if (p.some(function(e){ return (e && o2.typeOf(e.then)=="function") })){
|
|
|
return Promise.all(p);
|
|
|
}else{
|
|
|
- return { "then": function(s){ return s(p) || this;} };
|
|
|
- //return new Promise(function(s){s(p); return this;});
|
|
|
+ //return { "then": function(s){ return s(p) || this;} };
|
|
|
+ return new Promise(function(s){s(p); return this;});
|
|
|
}
|
|
|
}else{
|
|
|
if (p && o2.typeOf(p.then)=="function"){
|
|
|
return Promise.resolve(p);
|
|
|
}else{
|
|
|
- return { "then": function(s){ return s(p) || this;} };
|
|
|
- //return new Promise(function(s){s(p); return this;});
|
|
|
+ //return { "then": function(s){ return s(p) || this;} };
|
|
|
+ return new Promise(function(s){s(p); return this;});
|
|
|
}
|
|
|
}
|
|
|
// var method = (o2.typeOf(p)=="array") ? "all" : "resolve";
|