aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/PresentationView.tsx
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2019-05-10 23:01:08 -0400
committerBob Zeleznik <zzzman@gmail.com>2019-05-10 23:01:08 -0400
commit7da76d2538ebde21d7a878b5096d5a673e5d6375 (patch)
tree0ec7a4599fdbebb19de9d25ca8fbe30136bffd19 /src/client/views/PresentationView.tsx
parent464843e773022edc9a6ce6228b88ffb72021fa85 (diff)
added summary screen grab icon as a template view of a text document. converted Cast(...ListSpec(Doc)) pattern to DocListCast
Diffstat (limited to 'src/client/views/PresentationView.tsx')
-rw-r--r--src/client/views/PresentationView.tsx11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/client/views/PresentationView.tsx b/src/client/views/PresentationView.tsx
index 4853eb151..3fb24a339 100644
--- a/src/client/views/PresentationView.tsx
+++ b/src/client/views/PresentationView.tsx
@@ -141,8 +141,15 @@ export class PresentationView extends React.Component<PresViewProps> {
(activeW) => {
if (activeW && activeW instanceof Doc) {
PromiseValue(Cast(activeW.presentationView, Doc)).
- then(pv => runInAction(() =>
- self.Document = pv ? pv : (activeW.presentationView = new Doc())))
+ then(pv => runInAction(() => {
+ if (pv) self.Document = pv;
+ else {
+ pv = new Doc();
+ pv.title = "Presentation Doc";
+ activeW.presentationView = pv;
+ self.Document = pv;
+ }
+ }))
}
},
{ fireImmediately: true });