diff --git a/flutter_inappwebview_ohos/ohos/src/main/ets/components/plugin/webview/in_app_webview/FlutterWebView.ets b/flutter_inappwebview_ohos/ohos/src/main/ets/components/plugin/webview/in_app_webview/FlutterWebView.ets index c745bd5b0039a59b87cbc76f3fd96460b1e18c47..db3ccbddcb68cacb81a023f20a68f306be105f68 100644 --- a/flutter_inappwebview_ohos/ohos/src/main/ets/components/plugin/webview/in_app_webview/FlutterWebView.ets +++ b/flutter_inappwebview_ohos/ohos/src/main/ets/components/plugin/webview/in_app_webview/FlutterWebView.ets @@ -137,7 +137,7 @@ export class FlutterWebView extends PlatformWebView { } dispose(): void { - if (this.keepAliveId != null && this.webView != null) { + if (this.keepAliveId == null && this.webView != null) { this.webView.dispose(); this.webView = null;