Skip to content
This repository has been archived by the owner on Oct 17, 2024. It is now read-only.

Commit

Permalink
Fix state storage not initializing when writing
Browse files Browse the repository at this point in the history
  • Loading branch information
david-swift committed Sep 3, 2024
1 parent 6eb346f commit 34d43bc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Sources/Model/Data Flow/State.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ public struct State<Value>: StateProtocol {
return value
}
nonmutating set {
if content.storage == nil {
_ = rawValue
}
content.value = newValue
}
}
Expand Down

0 comments on commit 34d43bc

Please sign in to comment.