Skip to content

Commit

Permalink
fix tests again :-)
Browse files Browse the repository at this point in the history
  • Loading branch information
digitalbuddha committed Aug 11, 2023
1 parent a8f2338 commit 3794427
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,10 @@ internal class RealStore<Key : Any, Network : Any, Output : Any, Local : Any>(
}

val diskValue = diskData.value
val isValid = validator == null || diskData.origin is StoreReadResponseOrigin.Fetcher || diskValue != null && validator.isValid(diskValue)
val isValid =
(validator == null && diskValue != null) || diskData.origin is StoreReadResponseOrigin.Fetcher || (diskValue != null && validator?.isValid(
diskValue
) ?: true)

if (isValid) {
@Suppress("UNCHECKED_CAST")
Expand Down

0 comments on commit 3794427

Please sign in to comment.