Skip to content

Commit 7660b86

Browse files
committed
Fix iOS availability
1 parent b910296 commit 7660b86

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Sources/SwiftUIX/Intramodular/Web/WebView.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,11 @@ struct _WKWebViewRepresentable: AppKitOrUIKitViewRepresentable {
157157
let webpagePreferences = WKWebpagePreferences()
158158

159159
if let allowsContentJavaScript = self.configuration.allowsContentJavaScript {
160-
webpagePreferences.allowsContentJavaScript = allowsContentJavaScript
160+
if #available(iOS 14, macOS 11, *) {
161+
webpagePreferences.allowsContentJavaScript = allowsContentJavaScript
162+
} else {
163+
// TODO: (@vatsal) handle earlier versions
164+
}
161165
}
162166

163167
let webViewConfiguration = WKWebViewConfiguration()

0 commit comments

Comments
 (0)