We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1217e37 commit 3ecb776Copy full SHA for 3ecb776
Sources/DataStore/DataStore.swift
@@ -149,7 +149,9 @@ where StoredData.From == DataLoader.DeviceData,
149
open func load() async throws {
150
let loadedData: [DeviceData] = try await loader.load()
151
152
- try store(data: loadedData)
+ try await MainActor.run {
153
+ try store(data: loadedData)
154
+ }
155
}
156
157
/**
@@ -164,8 +166,10 @@ where StoredData.From == DataLoader.DeviceData,
164
166
*/
165
167
open func load(id: LoadedData.ID) async throws {
168
let loadedData: DeviceData = try await loader.load(id: id)
-
- try store(data: [loadedData])
169
+
170
171
+ try store(data: [loadedData])
172
173
174
175
0 commit comments