We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent adf5024 commit b075960Copy full SHA for b075960
Sources/ComposableArchitecture/SwiftUI/IdentifiedArray.swift
@@ -119,6 +119,17 @@ where ID: Hashable {
119
"""
120
)
121
}
122
+ if newValue![keyPath: self.id] != id {
123
+ fatalError(
124
+ """
125
+ Can't update element at identifier \(id) with element having mismatched identifier \
126
+ \(newValue![keyPath: self.id]).
127
+
128
+ If you would like to replace the element with identifier \(id) with an element with a \
129
+ new identifier, remove the existing element and then insert the new element, instead.
130
131
+ )
132
+ }
133
self.dictionary[id] = newValue
134
135
0 commit comments