diff options
Diffstat (limited to 'src/client/views/MainView.tsx')
-rw-r--r-- | src/client/views/MainView.tsx | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/client/views/MainView.tsx b/src/client/views/MainView.tsx index 83d9a3498..07ba7e805 100644 --- a/src/client/views/MainView.tsx +++ b/src/client/views/MainView.tsx @@ -241,11 +241,10 @@ export class MainView extends React.Component { ); } const activeDash = PromiseValue(this.userDoc.activeDashboard); - if (activeDash) { - activeDash.then(dash => dash instanceof Doc && CurrentUserUtils.openDashboard(this.userDoc, dash)); - } else { - CurrentUserUtils.createNewDashboard(this.userDoc); - } + activeDash.then(dash => { + if (dash instanceof Doc) CurrentUserUtils.openDashboard(this.userDoc, dash); + else CurrentUserUtils.createNewDashboard(this.userDoc); + }); } } |