diff --git a/src/Lifecycle.js b/src/Lifecycle.js index 517040ebb2..434975a5bc 100644 --- a/src/Lifecycle.js +++ b/src/Lifecycle.js @@ -240,11 +240,11 @@ function _handleLoadSessionFailure(e) { if (e instanceof Matrix.InvalidStoreError) { if (e.reason === Matrix.InvalidStoreError.TOGGLED_LAZY_LOADING) { - const LazyLoadingResyncDialog = - sdk.getComponent("views.dialogs.LazyLoadingResyncDialog"); return Promise.resolve().then(() => { const lazyLoadEnabled = e.value; if (lazyLoadEnabled) { + const LazyLoadingResyncDialog = + sdk.getComponent("views.dialogs.LazyLoadingResyncDialog"); return new Promise((resolve) => { Modal.createDialog(LazyLoadingResyncDialog, { onFinished: resolve,