mirror of
https://github.com/mudler/LocalAI.git
synced 2026-02-03 03:02:38 -05:00
The spa-router.js was loaded with defer but registered the Alpine.js store using the 'alpine:init' event. Since Alpine.js also loads with defer, there was a race condition where Alpine could initialize before the event listener was registered, causing $store.router to be undefined. Moved the entire router store definition and registration inline in spa.html so it's guaranteed to be registered before Alpine.js initializes. Co-authored-by: mudler <2420543+mudler@users.noreply.github.com>