Skip to content

Commit 099e059

Browse files
authored
Fix using supplied decoder for encrypted values (#23)
# Fix using supplied decoder for encrypted values ## ♻️ Current situation & Problem There was an issue in the `read` implementation where the supplied `decoder` was only used if the element wasn't encrypted. The other code path was forgotten to be updated in #21. This issue is fixed by this PR. ## ⚙️ Release Notes * Fixed an issue where the supplied decoder wasn't used. ## 📚 Documentation -- ## ✅ Testing -- ## 📝 Code of Conduct & Contributing Guidelines By submitting creating this pull request, you agree to follow our [Code of Conduct](https://github.com/StanfordSpezi/.github/blob/main/CODE_OF_CONDUCT.md) and [Contributing Guidelines](https://github.com/StanfordSpezi/.github/blob/main/CONTRIBUTING.md): - [x] I agree to follow the [Code of Conduct](https://github.com/StanfordSpezi/.github/blob/main/CODE_OF_CONDUCT.md) and [Contributing Guidelines](https://github.com/StanfordSpezi/.github/blob/main/CONTRIBUTING.md).
1 parent 52bd5cb commit 099e059

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/SpeziLocalStorage/LocalStorage.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ public final class LocalStorage: Module, DefaultInitializable, EnvironmentAccess
161161
throw LocalStorageError.decryptionNotPossible
162162
}
163163

164-
return try JSONDecoder().decode(C.self, from: decryptedData)
164+
return try decoder.decode(C.self, from: decryptedData)
165165
}
166166

167167

0 commit comments

Comments
 (0)