Skip to content

Commit

Permalink
Fix build failure on Linux (#304)
Browse files Browse the repository at this point in the history
* Fix build failure on Linux

* Update Sources/Dependencies/DependencyValues.swift

---------

Co-authored-by: Stephen Celis <stephen.celis@gmail.com>
Co-authored-by: Stephen Celis <stephen@stephencelis.com>
  • Loading branch information
3 people authored Nov 13, 2024
1 parent d7a3304 commit 96eecd4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/Dependencies/DependencyValues.swift
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ public final class CachedValues: @unchecked Sendable {
case .preview:
if !CachedValues.isAccessingCachedDependencies {
value = CachedValues.$isAccessingCachedDependencies.withValue(true) {
#if compiler(>=6)
#if canImport(SwiftUI) && compiler(>=6)
return previewValues[key]
#else
return Key.previewValue
Expand Down

0 comments on commit 96eecd4

Please sign in to comment.