CB-9150 Fix InAppBrowser executeScript crash on Windows if no data returned
This commit is contained in:
parent
6b99fb96f8
commit
49757716f5
@ -1,4 +1,4 @@
|
|||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
* Licensed to the Apache Software Foundation (ASF) under one
|
* Licensed to the Apache Software Foundation (ASF) under one
|
||||||
* or more contributor license agreements. See the NOTICE file
|
* or more contributor license agreements. See the NOTICE file
|
||||||
@ -247,7 +247,8 @@ var IAB = {
|
|||||||
if (isWebViewAvailable && browserWrap && popup) {
|
if (isWebViewAvailable && browserWrap && popup) {
|
||||||
var op = popup.invokeScriptAsync("eval", code);
|
var op = popup.invokeScriptAsync("eval", code);
|
||||||
op.oncomplete = function (e) {
|
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);
|
hasCallback && win(result);
|
||||||
};
|
};
|
||||||
op.onerror = function () { };
|
op.onerror = function () { };
|
||||||
|
Loading…
Reference in New Issue
Block a user