Skip to content

Commit

Permalink
fix: fix sur la synchro du hors ligne
Browse files Browse the repository at this point in the history
Signed-off-by: Maud Royer <hello@maudroyer.fr>
  • Loading branch information
jillro committed Jun 18, 2024
1 parent 3c23b91 commit cdaa56e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/stores/storage.js
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,14 @@ export const useCartoBioStorage = defineStore('storage', () => {
const operatorStore = useOperatorStore()

if (!navigator.onLine) {
return await recordStore.ready(recordStore.record.record_id)
if (recordStore.record.record_id) {
return await recordStore.ready(recordStore.record.record_id)
}
if (operatorStore.operator.numerobio) {
return await operatorStore.ready(operatorStore.operator.numerobio)
}

return
}
if (syncing.value) return
syncing.value = true
Expand Down

0 comments on commit cdaa56e

Please sign in to comment.