Skip to content

Commit a063bba

Browse files
committed
Added FORCE_PUBLISHED_OBJECT_WRAPPER compilation flag
1 parent 4b3f93f commit a063bba

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

Sources/PublishedObject/PublishedObject.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,12 @@ public struct PublishedObject<Value: ObservableObject> where Value.ObjectWillCha
7676
}
7777
}
7878

79+
#if FORCE_PUBLISHED_OBJECT_WRAPPER
7980
/// Force PublishedObject when using ObservableObjects
8081
@available(iOS 13.0, OSX 10.15, tvOS 13.0, watchOS 6.0, *)
8182
extension Published where Value: ObservableObject {
8283
public init(wrappedValue: Value) {
8384
fatalError("Use PublishedObject with ObservableObjects")
8485
}
8586
}
87+
#endif

0 commit comments

Comments
 (0)