diff --git a/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview_android/plugin_scripts_js/InterceptAjaxRequestJS.java b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview_android/plugin_scripts_js/InterceptAjaxRequestJS.java index a675e337..2ad476f1 100644 --- a/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview_android/plugin_scripts_js/InterceptAjaxRequestJS.java +++ b/flutter_inappwebview_android/android/src/main/java/com/pichillilorenzo/flutter_inappwebview_android/plugin_scripts_js/InterceptAjaxRequestJS.java @@ -220,7 +220,7 @@ public class InterceptAjaxRequestJS { " data = new Uint8Array(result.data);" + " }" + " self.withCredentials = result.withCredentials;" + - " if (result.responseType != null && result.isAsync) {" + + " if (result.responseType != null && self.isAsync) {" + " self.responseType = result.responseType;" + " };" + " for (var header in result.headers) {" +