Fix state storage not initializing when writing

This commit is contained in:
david-swift 2024-09-03 06:33:07 +02:00
parent 6eb346f4c8
commit 34d43bc0a8

View File

@ -51,6 +51,9 @@ public struct State<Value>: StateProtocol {
return value
}
nonmutating set {
if content.storage == nil {
_ = rawValue
}
content.value = newValue
}
}