diff --git a/src/windows/InAppBrowserProxy.js b/src/windows/InAppBrowserProxy.js index 817516e..fc037bd 100644 --- a/src/windows/InAppBrowserProxy.js +++ b/src/windows/InAppBrowserProxy.js @@ -1,4 +1,4 @@ -/* +/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -247,7 +247,8 @@ var IAB = { if (isWebViewAvailable && browserWrap && popup) { var op = popup.invokeScriptAsync("eval", code); op.oncomplete = function (e) { - var result = [e.target.result]; + // return null if event target is unavailable by some reason + var result = (e && e.target) ? [e.target.result] : [null]; hasCallback && win(result); }; op.onerror = function () { };