Files
Fleetbase-Mirror-Repo/console/app/instance-initializers/set-application-instance.js
roncodes 08dabaf138 fix: pass appInstance instead of appInstance.application
- Change window.Fleetbase = appInstance (not appInstance.application)
- Change setApplicationInstance(appInstance) (not appInstance.application)
- appInstance IS the ApplicationInstance, not the Application class
- Remove comment about RegistryService cascade
2025-12-02 21:07:27 -05:00

18 lines
552 B
JavaScript

export function initialize(appInstance) {
// Set window.Fleetbase to the application instance for global access
// This is used by services and engines to access the root application instance
if (typeof window !== 'undefined') {
window.Fleetbase = appInstance;
}
// Look up UniverseService and set the application instance
const universeService = appInstance.lookup('service:universe');
if (universeService) {
universeService.setApplicationInstance(appInstance);
}
}
export default {
initialize
};