Explorar el Código

修复promiseAll方法为空数组时的问题

huqi hace 5 años
padre
commit
533e1477bd
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      o2web/source/o2_core/o2.js

+ 1 - 1
o2web/source/o2_core/o2.js

@@ -1862,7 +1862,7 @@ if (!window.Promise){
 
     var _promiseAll = function(p){
         if (o2.typeOf(p)=="array"){
-            if (p.some(function(e){ return (o2.typeOf(e.then)=="function") })){
+            if (p.some(function(e){ return (e && o2.typeOf(e.then)=="function") })){
                 return Promise.all(p);
             }else{
                 return { "then": function(s){ s(p); return this;} };