Commit da0b2f9
committed
fix race condition
Setting .html starts the loading of the UI, but setup() sets up the message listeners in the backend
for messages from the UI.
We had setup() come after, and it worked, but if I added a small sleep() before setup() was run
it would result in a failure due to messages not being handled due to handlers not being setup in time.
As a solution this just moves the handler setup before we set the new UI.
Signed-off-by: nkomonen-amazon <[email protected]>1 parent 965969c commit da0b2f9
File tree
2 files changed
+5
-3
lines changed- packages/core/src/login/webview
- vue
2 files changed
+5
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
138 | | - | |
139 | 138 | | |
140 | 139 | | |
| 140 | + | |
| 141 | + | |
141 | 142 | | |
142 | 143 | | |
143 | 144 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
| 88 | + | |
| 89 | + | |
89 | 90 | | |
90 | 91 | | |
91 | 92 | | |
| |||
119 | 120 | | |
120 | 121 | | |
121 | 122 | | |
122 | | - | |
| 123 | + | |
123 | 124 | | |
124 | 125 | | |
125 | 126 | | |
| |||
0 commit comments