diff options
| author | bobzel <zzzman@gmail.com> | 2020-08-29 20:15:08 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2020-08-29 20:15:08 -0400 |
| commit | d517d1e294f4123bd1b653d2fe3f747941905be8 (patch) | |
| tree | 7386bd37902f7a41858578cb107e39add3b248dc /src/client/views/MainView.tsx | |
| parent | 51f9da2bb6529c102c300a1ceb4ccd23065a76fc (diff) | |
from last
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); + }); } } |
