Fix: _queued-Guard in poison/walks/diary — kein Crash bei SW-gequeuten Requests
Wenn der SW einen POST in die Offline-Queue legt, gibt api.js { _queued: true }
zurück (202). Ohne Guard versuchten poison/walks/diary den Response als echtes
Server-Objekt zu nutzen → undefined lat/lon → Leaflet-Crash, undefined id → Upload-Fehler.
Nach dem Guard wird das Modal nur geschlossen; der QUEUE_PROCESSED-Toast informiert
den User sobald synchronisiert.
- poison.js: _queued guard nach API.poison.report()
- walks.js: _queued guard + try-catch statt navigator.onLine
- diary.js: _queued guard nach API.diary.create()
- SW by-v992, APP_VER 992
This commit is contained in:
parent
f2856b8acb
commit
32fde79a40
6 changed files with 20 additions and 10 deletions
|
|
@ -543,6 +543,9 @@ window.Page_poison = (() => {
|
|||
|
||||
const created = await API.poison.report(payload);
|
||||
|
||||
// SW hat Request in Queue gelegt (offline) — Modal schließen, kein Marker
|
||||
if (created?._queued) { UI.modal.close(); return; }
|
||||
|
||||
// Foto hochladen
|
||||
if (photoInput?.files[0]) {
|
||||
try {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue