@kumori/aurora-backend-handler 1.1.38 → 1.1.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/backend-handler.ts +8 -10
- package/package.json +1 -1
package/backend-handler.ts
CHANGED
|
@@ -104,18 +104,16 @@ export class BackendHandler {
|
|
|
104
104
|
environment.apiServer.apiVersion = apiVersion;
|
|
105
105
|
let cookieReady = false;
|
|
106
106
|
getUserHTTP().then(() => {
|
|
107
|
-
cookieReady = true;
|
|
108
107
|
this.changeRoute(route);
|
|
108
|
+
eventHelper.user.subscribe.load((data: UserData) => {
|
|
109
|
+
initializeGlobalWebSocketClient(token, "", "", data);
|
|
110
|
+
});
|
|
111
|
+
const loadedCb = (data: UserData) => {
|
|
112
|
+
updateUserComplete(data);
|
|
113
|
+
};
|
|
114
|
+
eventHelper.user.subscribe.loaded(loadedCb);
|
|
115
|
+
eventHelper.user.publish.load({} as UserData);
|
|
109
116
|
})
|
|
110
|
-
eventHelper.user.subscribe.load((data: UserData) => {
|
|
111
|
-
if(cookieReady){
|
|
112
|
-
initializeGlobalWebSocketClient(token, "", "", data);
|
|
113
|
-
}
|
|
114
|
-
});
|
|
115
|
-
const loadedCb = (data: UserData) => {
|
|
116
|
-
updateUserComplete(data);
|
|
117
|
-
};
|
|
118
|
-
eventHelper.user.subscribe.loaded(loadedCb);
|
|
119
117
|
}
|
|
120
118
|
|
|
121
119
|
/**
|