提交 06ef49dd 编写于 作者: NoSubject's avatar NoSubject

Merge branch 'fix/o2_promiseAll' into 'wrdp'

修复o2.promiseAll方法

See merge request o2oa/o2oa!2731
......@@ -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";
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册