aboutsummaryrefslogtreecommitdiff
path: root/src/client/util/DocumentManager.ts
diff options
context:
space:
mode:
authorFawn <fangrui_tong@brown.edu>2019-04-22 00:09:25 -0400
committerFawn <fangrui_tong@brown.edu>2019-04-22 00:09:25 -0400
commit97dcec0e5ac07deb9af9acb16948cc6678778cba (patch)
tree74dd3d2bd938a5ab5b3bb082a8fc2846eefa5999 /src/client/util/DocumentManager.ts
parente794b4b38e8ab2f4e7a79f223f9488cc845c724f (diff)
parentb63bcb791013766d5d16e4f38964499268f904c4 (diff)
merge
Diffstat (limited to 'src/client/util/DocumentManager.ts')
-rw-r--r--src/client/util/DocumentManager.ts14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/client/util/DocumentManager.ts b/src/client/util/DocumentManager.ts
index 3b5a5b470..56669fb79 100644
--- a/src/client/util/DocumentManager.ts
+++ b/src/client/util/DocumentManager.ts
@@ -38,11 +38,17 @@ export class DocumentManager {
toReturn = view;
return;
}
- let docSrc = doc.GetT(KeyStore.Prototype, Document);
- if (docSrc && docSrc !== FieldWaiting && Object.is(docSrc, toFind)) {
- toReturn = view;
- }
});
+ if (!toReturn) {
+ DocumentManager.Instance.DocumentViews.map(view => {
+ let doc = view.props.Document;
+
+ let docSrc = doc.GetT(KeyStore.Prototype, Document);
+ if (docSrc && docSrc !== FieldWaiting && Object.is(docSrc, toFind)) {
+ toReturn = view;
+ }
+ });
+ }
return toReturn;
}