mirror of
https://github.com/fleetbase/fleetbase.git
synced 2025-12-19 14:18:57 +00:00
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
This commit is contained in:
@@ -1,15 +1,14 @@
|
||||
export function initialize(appInstance) {
|
||||
// Set window.Fleetbase to the application for global access
|
||||
// This is used by services and engines to access the root application
|
||||
// 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.application;
|
||||
window.Fleetbase = appInstance;
|
||||
}
|
||||
|
||||
// Look up UniverseService and set the application instance
|
||||
// This cascades to RegistryService automatically via universe.setApplicationInstance()
|
||||
const universeService = appInstance.lookup('service:universe');
|
||||
if (universeService) {
|
||||
universeService.setApplicationInstance(appInstance.application);
|
||||
universeService.setApplicationInstance(appInstance);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user