Skip to content

Commit

Permalink
Fix using supplied decoder for encrypted values (#23)
Browse files Browse the repository at this point in the history
# 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).
  • Loading branch information
Supereg authored Aug 9, 2024
1 parent 52bd5cb commit 099e059
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/SpeziLocalStorage/LocalStorage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ public final class LocalStorage: Module, DefaultInitializable, EnvironmentAccess
throw LocalStorageError.decryptionNotPossible
}

return try JSONDecoder().decode(C.self, from: decryptedData)
return try decoder.decode(C.self, from: decryptedData)
}


Expand Down

0 comments on commit 099e059

Please sign in to comment.