summaryrefslogtreecommitdiffstats
path: root/sdnr/wt/odlux/framework/src/app.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'sdnr/wt/odlux/framework/src/app.tsx')
-rw-r--r--sdnr/wt/odlux/framework/src/app.tsx8
1 files changed, 5 insertions, 3 deletions
diff --git a/sdnr/wt/odlux/framework/src/app.tsx b/sdnr/wt/odlux/framework/src/app.tsx
index 23ae2fbc9..2d913be1b 100644
--- a/sdnr/wt/odlux/framework/src/app.tsx
+++ b/sdnr/wt/odlux/framework/src/app.tsx
@@ -68,6 +68,10 @@ export const runApplication = () => {
const initialToken = localStorage.getItem("userToken");
const applicationStore = applicationStoreCreator();
+ if (initialToken) {
+ applicationStore.dispatch(new UpdateUser(User.fromString(initialToken) || undefined));
+ }
+
window.onerror = function (msg: string, url: string, line: number, col: number, error: Error) {
// Note that col & error are new to the HTML 5 spec and may not be
// supported in every browser. It worked for me in Chrome.
@@ -98,9 +102,7 @@ export const runApplication = () => {
ReactDOM.render(<App />, document.getElementById('app'));
- if (initialToken) {
- applicationStore.dispatch(new UpdateUser(User.fromString(initialToken) || undefined));
- }
+
};