Skip to content

Commit 96eecd4

Browse files
Fix build failure on Linux (#304)
* Fix build failure on Linux * Update Sources/Dependencies/DependencyValues.swift --------- Co-authored-by: Stephen Celis <[email protected]> Co-authored-by: Stephen Celis <[email protected]>
1 parent d7a3304 commit 96eecd4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/Dependencies/DependencyValues.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ public final class CachedValues: @unchecked Sendable {
545545
case .preview:
546546
if !CachedValues.isAccessingCachedDependencies {
547547
value = CachedValues.$isAccessingCachedDependencies.withValue(true) {
548-
#if compiler(>=6)
548+
#if canImport(SwiftUI) && compiler(>=6)
549549
return previewValues[key]
550550
#else
551551
return Key.previewValue

0 commit comments

Comments
 (0)