Fix: worlds.js doppeltes const dog → SyntaxError behoben, SW by-v640
This commit is contained in:
parent
fc2002847c
commit
c266814aa9
4 changed files with 8 additions and 9 deletions
|
|
@ -3,7 +3,7 @@
|
|||
Router, State-Management, Navigation, Initialisierung.
|
||||
============================================================ */
|
||||
|
||||
const APP_VER = '639'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
|
||||
const APP_VER = '640'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
|
||||
const APP_VERSION = '1.2.1'; // ← semantische Version, wird bei make release gesetzt
|
||||
const IS_STAGING = location.hostname === 'staging.banyaro.app';
|
||||
|
||||
|
|
|
|||
|
|
@ -761,7 +761,11 @@ window.Worlds = (() => {
|
|||
return;
|
||||
}
|
||||
|
||||
const dog = dogs[0];
|
||||
// Hunde global cachen für schnelles Cycling
|
||||
_dogs = dogs;
|
||||
if (_dogIdx >= _dogs.length) _dogIdx = 0;
|
||||
const dog = _dogs[_dogIdx];
|
||||
|
||||
const [streakRes, diaryRes] = await Promise.allSettled([
|
||||
_cachedGet(`streak_${dog.id}`, `/streak/${dog.id}`),
|
||||
_cachedGet(`diary_${dog.id}`, `/dogs/${dog.id}/diary?limit=1`),
|
||||
|
|
@ -770,11 +774,6 @@ window.Worlds = (() => {
|
|||
const diaryData = diaryRes.value?.data ?? diaryRes.value;
|
||||
const lastEntry = diaryData?.entries?.[0] || diaryData?.[0] || null;
|
||||
|
||||
// Hunde global cachen für schnelles Cycling
|
||||
_dogs = dogs;
|
||||
if (_dogIdx >= _dogs.length) _dogIdx = 0;
|
||||
const dog = _dogs[_dogIdx];
|
||||
|
||||
const ageStr = dog.alter_jahre ? _fmtAlter(dog.alter_jahre) : '';
|
||||
const stats = [dog.rasse, ageStr, dog.gewicht_kg ? dog.gewicht_kg + ' kg' : null].filter(Boolean).join(' · ');
|
||||
const otherDogs = _dogs.filter((_, i) => i !== _dogIdx);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue