Fixes #20: After change errors (JSON parse + equipment tab) #21

Merged
Pakobbix merged 3 commits from issue-20-fix-json-parse-equipment into main 2026-07-12 16:22:01 +00:00
Collaborator

Fixes two bugs introduced by recent code quality changes:

  1. JSON parse errors: Replaced JSON.parse() with repairJSON() in desktop.js and mobile.js for infoBox/userStats parsing. Handles malformed JSON with trailing content.

  2. Empty equipment tab: Added defensive initialization in renderEquipment() — ensures showEquipment defaults to true and equipment data structure exists. Added explicit render call during init.

Tests: 78/78 passed. Closes #20

Fixes two bugs introduced by recent code quality changes: 1. **JSON parse errors**: Replaced `JSON.parse()` with `repairJSON()` in desktop.js and mobile.js for infoBox/userStats parsing. Handles malformed JSON with trailing content. 2. **Empty equipment tab**: Added defensive initialization in `renderEquipment()` — ensures `showEquipment` defaults to `true` and equipment data structure exists. Added explicit render call during init. Tests: 78/78 passed. Closes #20
ARIA added 1 commit 2026-07-12 15:33:20 +00:00
- Replace JSON.parse() with repairJSON() in desktop.js and mobile.js
  to handle malformed JSON from infoBox/userStats data
- Add defensive initialization in renderEquipment(): ensure showEquipment
  defaults to true and equipment data structure exists
- Add explicit renderEquipment() call during initialization
Collaborator

No issues found — changes look consistent with the stated intent. Ready to be merged.

✅ No issues found — changes look consistent with the stated intent. Ready to be merged.
ARIA added 1 commit 2026-07-12 15:56:41 +00:00
The equipment section has display:none in CSS and updateSectionVisibility()
is the only function that calls .show() on it. It was never called during
initialization, only when settings toggles changed. Added the call to the
main init flow so the equipment tab becomes visible on page load.
Author
Collaborator

@Zephyre_Review please review again — added updateSectionVisibility() call during init to fix equipment tab visibility.

@Zephyre_Review please review again — added updateSectionVisibility() call during init to fix equipment tab visibility.
Collaborator

No issues found — changes look consistent with the stated intent. Ready to be merged.

✅ No issues found — changes look consistent with the stated intent. Ready to be merged.
ARIA added 1 commit 2026-07-12 16:15:00 +00:00
Author
Collaborator

@Zephyre_Review please review — 3 commits fixing JSON parse errors, equipment tab visibility, and a broken import that caused 404.

@Zephyre_Review please review — 3 commits fixing JSON parse errors, equipment tab visibility, and a broken import that caused 404.
Collaborator

No issues found — changes look consistent with the stated intent. Ready to be merged.

✅ No issues found — changes look consistent with the stated intent. Ready to be merged.
Pakobbix merged commit 6e816e1436 into main 2026-07-12 16:22:01 +00:00
Pakobbix deleted branch issue-20-fix-json-parse-equipment 2026-07-12 16:22:01 +00:00
Sign in to join this conversation.