found source of double-render, removed old experiment
This commit is contained in:
parent
cccc1a5383
commit
8df400a676
2 changed files with 1 additions and 49 deletions
|
@ -107,19 +107,7 @@ export default function(state, emitter) {
|
|||
render();
|
||||
});
|
||||
|
||||
/*
|
||||
FIXME choo on Edge double-triggers loaded routes
|
||||
causing 'authenticate' to fire twice which leads to
|
||||
an error. Until that's fixed we have authLocked to
|
||||
prevent the second event from causing the error.
|
||||
Once choo doesn't double-trigger we can remove authLocked.
|
||||
*/
|
||||
let authLocked = false;
|
||||
emitter.on('authenticate', async (code, oauthState) => {
|
||||
if (authLocked) {
|
||||
return;
|
||||
}
|
||||
authLocked = true;
|
||||
try {
|
||||
await state.user.finishLogin(code, oauthState);
|
||||
await state.user.syncFileList();
|
||||
|
@ -128,7 +116,6 @@ export default function(state, emitter) {
|
|||
emitter.emit('replaceState', '/error');
|
||||
setTimeout(render);
|
||||
}
|
||||
authLocked = false;
|
||||
});
|
||||
|
||||
emitter.on('upload', async () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue