diff --git a/o2web/source/o2_core/o2.js b/o2web/source/o2_core/o2.js index 47d4dfdd85c592348e69a036b375bc18b6321150..2c95308340d419e96e2f350a37a2336db6ce04b1 100644 --- a/o2web/source/o2_core/o2.js +++ b/o2web/source/o2_core/o2.js @@ -1973,7 +1973,7 @@ if (window.Promise && !Promise.any){ "then": function(s){ if (s){ var r = s(p); - return (r.then && o2.typeOf(r.then)=="function") ? r : this; + return (r && r.then && o2.typeOf(r.then)=="function") ? r : this; } return this; } @@ -1987,7 +1987,7 @@ if (window.Promise && !Promise.any){ "then": function(s){ if (s){ var r = s(p); - return (r.then && o2.typeOf(r.then)=="function") ? r : this; + return (r && r.then && o2.typeOf(r.then)=="function") ? r : this; } return this; }