Browse Source

fix: dictionary guard

Sam Jaffe 2 tuần trước cách đây
mục cha
commit
7e6f31a502
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      Todos/View/ContentView.swift

+ 1 - 1
Todos/View/ContentView.swift

@@ -19,7 +19,7 @@ struct ContentView: View {
   var body: some View {
     NavigationSplitView {
       List(selection: $selection) {
-        ForEach(items, id: \.self) { item in
+        ForEach(items, id: \.uuid) { item in
           NavigationLink(value: item) {
             Text(item.name)
           }.swipeActions(content: {