aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/Main.tsx
diff options
context:
space:
mode:
authorTyler Schicke <tyler_schicke@brown.edu>2019-03-18 06:57:25 -0400
committerTyler Schicke <tyler_schicke@brown.edu>2019-03-18 06:57:25 -0400
commit4354f7f9d7a62a4193ac8f84380722db75d806d8 (patch)
tree7a07cedb68d0606511748166b8803a69f4528023 /src/client/views/Main.tsx
parent7859d3c9902d6d15666cce6a93a24cfba6ffdf32 (diff)
Fixed image upload to mostly work with authentication
Diffstat (limited to 'src/client/views/Main.tsx')
-rw-r--r--src/client/views/Main.tsx16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/client/views/Main.tsx b/src/client/views/Main.tsx
index d0f84f779..26a07fdfe 100644
--- a/src/client/views/Main.tsx
+++ b/src/client/views/Main.tsx
@@ -176,13 +176,15 @@ export class Main extends React.Component {
this.mainContainer.GetTAsync(KeyStore.ActiveFrame, Document, field => this.mainfreeform = field);
this.mainContainer.GetTAsync(KeyStore.OptionalRightCollection, Document, col => {
// if there is a pending doc, and it has new data, show it (syip: we use a timeout to prevent collection docking view from being uninitialized)
- if (col) {
- col.GetTAsync<ListField<Document>>(KeyStore.Data, ListField, (f: Opt<ListField<Document>>) => {
- if (f && f.Data.length > 0) {
- CollectionDockingView.Instance.AddRightSplit(col);
- }
- })
- }
+ setTimeout(() => {
+ if (col) {
+ col.GetTAsync<ListField<Document>>(KeyStore.Data, ListField, (f: Opt<ListField<Document>>) => {
+ if (f && f.Data.length > 0) {
+ CollectionDockingView.Instance.AddRightSplit(col);
+ }
+ })
+ }
+ }, 100);
});
}