瀏覽代碼

fix: dictionary guard

Sam Jaffe 2 周之前
父節點
當前提交
7e6f31a502
共有 1 個文件被更改,包括 1 次插入1 次删除
  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: {