From d004ca32b285610dcb1a3d5a3fcb2592ff6c73fb Mon Sep 17 00:00:00 2001 From: Balazs Perlaki-Horvath Date: Sun, 27 Apr 2025 22:44:56 +0200 Subject: [PATCH] Clean up browser if fails to load zim file --- App/App_macOS.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/App/App_macOS.swift b/App/App_macOS.swift index 0d61c87a..b6efba77 100644 --- a/App/App_macOS.swift +++ b/App/App_macOS.swift @@ -274,6 +274,7 @@ struct RootView: View { let mainPageURL = await ZimFileService.shared.getMainPageURL(zimFileID: metadata.fileID) { browser.load(url: mainPageURL) } else { + await browser.clear() isOpenFileAlertPresented = true openFileAlert = .unableToOpen(filenames: [url.lastPathComponent]) }