Skip to content

Commit

Permalink
fix: null check error
Browse files Browse the repository at this point in the history
  • Loading branch information
andychucs committed Sep 28, 2024
1 parent 9ba61f4 commit 9a23126
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/providers/generatable/webview_provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,11 @@ class WebController extends _$WebController {
Future<void> httpRedirect() async {
if (!inKancolleWindow) {
WebUri? currentUrl = await controller.getUrl();
if (currentUrl!.path.startsWith(Uri.parse(kGameUrl).path)) {
if (currentUrl == null) {
Toast.showError(title: "Get Url Fail");
return;
}
if (currentUrl.path.startsWith(Uri.parse(kGameUrl).path)) {
// May be HTTPS or HTTP
if (Platform.isIOS) {
await controller.injectJavascriptFileFromAsset(
Expand Down

0 comments on commit 9a23126

Please sign in to comment.