mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-25 22:27:32 +00:00
chore(lint): keep the fixes within the lint ratchets
No promise in a condition, sequential awaits through a reduce instead of a loop, no non-null assertions or any in the new tests, an awaited act, one options object for a stop edit and a handled rejection for the offline copy.
This commit is contained in:
@@ -70,7 +70,11 @@ export const useTripAddonsStore = create<TripAddonsState>((set, get) => ({
|
||||
// A push that landed meanwhile is newer than this answer and stays, in the
|
||||
// store and in the device's copy the answer was written over.
|
||||
if (current && current.rev !== rev) {
|
||||
if (addons && current.addons) void tripAddonsRepo.remember(tripId, current.addons).catch(() => {});
|
||||
if (addons && current.addons)
|
||||
void tripAddonsRepo.remember(tripId, current.addons).catch(() => {
|
||||
// The device copy stays one answer behind until the next read of this trip writes it.
|
||||
return undefined;
|
||||
});
|
||||
return current.addons;
|
||||
}
|
||||
const entry: TripAddonsEntry = addons
|
||||
|
||||
Reference in New Issue
Block a user