Skip to content

Commit

Permalink
fix(splash-screen): avoid conditional downcast warning (#776)
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin DONADIEU committed Jan 24, 2022
1 parent f18ee64 commit 87ed912
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion splash-screen/ios/Plugin/SplashScreen.swift
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ import Capacitor
// Update the bounds for the splash image. This will also be called when
// the parent view observers fire
private func updateSplashImageBounds() {
var window: UIWindow? = UIApplication.shared.delegate?.window as? UIWindow
var window: UIWindow? = UIApplication.shared.delegate?.window ?? nil

if #available(iOS 13, *), window == nil {
let scene: UIWindowScene? = UIApplication.shared.connectedScenes.first as? UIWindowScene
Expand Down

0 comments on commit 87ed912

Please sign in to comment.