secubox-openwrt/luci-app-secubox/htdocs/luci-static
CyberMind-FR bd032be85f fix(secubox): resolve race condition in appstore and modules data loading
Fixed issue where first page load would show empty apps/modules list, requiring
a refresh to display data.

Changes:
- Added error handling in refreshData() for both apps.js and modules.js
- Added null/empty data checks before storing results
- Fixed render() to use data parameter first, then fallback to cached instance data
- Added console logging for debugging empty responses
- Added user-friendly error notifications when API calls fail

The render function now properly uses:
  var apps = (data && data.apps) || this.appsData || [];
  var modules = (data && data.modules) || this.modulesData || [];

This ensures the data passed from load() is used on first render, preventing
the empty state on initial page load.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-31 11:48:18 +01:00
..
resources fix(secubox): resolve race condition in appstore and modules data loading 2025-12-31 11:48:18 +01:00