mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-17 04:41:36 +08:00
FIX: Now checking that webView.request.URL is not null before accessing properties on it. (#4830)
- The symptom is the app would crash when web view tries to load certain (valid) requests.
This commit is contained in:

committed by
Hristo Hristov

parent
d3a6a3f782
commit
2e09d3714a
@ -58,8 +58,13 @@ class UIWebViewDelegateImpl extends NSObject implements UIWebViewDelegate {
|
|||||||
traceWrite("UIWebViewDelegateClass.webViewDidFinishLoad(" + webView.request.URL + ")", traceCategories.Debug);
|
traceWrite("UIWebViewDelegateClass.webViewDidFinishLoad(" + webView.request.URL + ")", traceCategories.Debug);
|
||||||
}
|
}
|
||||||
let owner = this._owner.get();
|
let owner = this._owner.get();
|
||||||
|
|
||||||
if (owner) {
|
if (owner) {
|
||||||
owner._onLoadFinished(webView.request.URL.absoluteString);
|
let src = owner.src;
|
||||||
|
if (webView.request && webView.request.URL) {
|
||||||
|
src = webView.request.URL.absoluteString;
|
||||||
|
}
|
||||||
|
owner._onLoadFinished(src);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user