From 39acaa8e11557fa4f67c23d96e02b62d39b81f46 Mon Sep 17 00:00:00 2001 From: Vasil Trifonov Date: Fri, 13 Jul 2018 09:50:32 +0300 Subject: [PATCH] Fixing onReceiveError for API level >= 23 (#6056) * Fixing onReceiveError for API level >= 23 * using @ts-ignore as "super as any" is not a valid statement --- tns-core-modules/ui/web-view/web-view.android.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tns-core-modules/ui/web-view/web-view.android.ts b/tns-core-modules/ui/web-view/web-view.android.ts index bb44af2e7..2a6e6d885 100644 --- a/tns-core-modules/ui/web-view/web-view.android.ts +++ b/tns-core-modules/ui/web-view/web-view.android.ts @@ -70,7 +70,11 @@ function initializeWebViewClient(): void { let request: any = arguments[1]; let error: any = arguments[2]; - super.onReceivedError(view, request, error, null); + // before API version 23 there's no onReceiveError with 3 parameters, so it shouldn't come here + // but we don't have the onReceivedError with 3 parameters there and that's why we are ignorint tye typescript error + // @ts-ignore TS2554 + super.onReceivedError(view, request, error); + const owner = this.owner; if (owner) { if (traceEnabled()) { @@ -173,4 +177,4 @@ export class WebView extends WebViewBase { return nativeView.reload(); } } -} \ No newline at end of file +}