Skip to content

Commit 39acaa8

Browse files
vtrifonovdtopuzov
authored andcommitted
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
1 parent 0943157 commit 39acaa8

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

‎tns-core-modules/ui/web-view/web-view.android.ts‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,11 @@ function initializeWebViewClient(): void {
7070
let request: any = arguments[1];
7171
let error: any = arguments[2];
7272

73-
super.onReceivedError(view, request, error, null);
73+
// before API version 23 there's no onReceiveError with 3 parameters, so it shouldn't come here
74+
// but we don't have the onReceivedError with 3 parameters there and that's why we are ignorint tye typescript error
75+
// @ts-ignore TS2554
76+
super.onReceivedError(view, request, error);
77+
7478
const owner = this.owner;
7579
if (owner) {
7680
if (traceEnabled()) {
@@ -173,4 +177,4 @@ export class WebView extends WebViewBase {
173177
return nativeView.reload();
174178
}
175179
}
176-
}
180+
}

0 commit comments

Comments
 (0)