Kaynağa Gözat

Merge branch 'fix/o2_fix' into 'wrdp'

PromiseAll增加undefined判断

See merge request o2oa/o2oa!2196
胡起 5 yıl önce
ebeveyn
işleme
3ac041115e
1 değiştirilmiş dosya ile 1 ekleme ve 1 silme
  1. 1 1
      o2web/source/o2_core/o2.js

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

@@ -1869,7 +1869,7 @@ if (!window.Promise){
                 return { "then": function(s){ s(p); return this;} };
                 return { "then": function(s){ s(p); return this;} };
             }
             }
         }else{
         }else{
-            if (o2.typeOf(p.then)=="function"){
+            if (p && o2.typeOf(p.then)=="function"){
                 return Promise.resolve(p);
                 return Promise.resolve(p);
             }else{
             }else{
                 return { "then": function(s){ s(p); return this;} };
                 return { "then": function(s){ s(p); return this;} };