diff options
author | bob <bcz@cs.brown.edu> | 2019-05-14 10:03:08 -0400 |
---|---|---|
committer | bob <bcz@cs.brown.edu> | 2019-05-14 10:03:08 -0400 |
commit | 39e0f933fc446e70ae14006f8d9952822d798fe3 (patch) | |
tree | deb58be0ddb1cc239011fc3f24c57daae3c68cd1 /src/client/util/DocumentManager.ts | |
parent | a96b2d61fe05eacaaad793f2d9e19c3d99708137 (diff) | |
parent | af7b264b6939429cdda9ab6b5c685b661f564773 (diff) |
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web
Diffstat (limited to 'src/client/util/DocumentManager.ts')
-rw-r--r-- | src/client/util/DocumentManager.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/client/util/DocumentManager.ts b/src/client/util/DocumentManager.ts index 47bcb153f..49c5d8c19 100644 --- a/src/client/util/DocumentManager.ts +++ b/src/client/util/DocumentManager.ts @@ -41,7 +41,7 @@ export class DocumentManager { if (!toReturn) { DocumentManager.Instance.DocumentViews.map(view => { let doc = view.props.Document.proto; - if (doc && doc.Id === id) { + if (doc && doc[Id] === id) { toReturn = view; } }); @@ -50,7 +50,9 @@ export class DocumentManager { return toReturn; } - public getDocumentView(toFind: Doc): DocumentView | null { return this.getDocumentViewById(toFind[Id]); } + public getDocumentView(toFind: Doc): DocumentView | null { + return this.getDocumentViewById(toFind[Id]); + } public getDocumentViews(toFind: Doc): DocumentView[] { |