aboutsummaryrefslogtreecommitdiff
path: root/src/client/util/HypothesisUtils.ts
diff options
context:
space:
mode:
authorLionel Han <47760119+IGoByJoe@users.noreply.github.com>2020-09-04 19:02:50 -0700
committerLionel Han <47760119+IGoByJoe@users.noreply.github.com>2020-09-04 19:02:50 -0700
commite11c71a94016e3fe2529d0523fd62401baf90093 (patch)
tree3364d6a9ab147247b90ce9e390f4aef945afd0c5 /src/client/util/HypothesisUtils.ts
parent4767a10336309c679da60fd244548414c055ac50 (diff)
parent2ef7900d1210bc0e5261e1d1f8fd1ba5f3a0ee4c (diff)
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into new_audio
Diffstat (limited to 'src/client/util/HypothesisUtils.ts')
-rw-r--r--src/client/util/HypothesisUtils.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/client/util/HypothesisUtils.ts b/src/client/util/HypothesisUtils.ts
index 9ede94e4b..4a5b52e1e 100644
--- a/src/client/util/HypothesisUtils.ts
+++ b/src/client/util/HypothesisUtils.ts
@@ -21,7 +21,7 @@ export namespace Hypothesis {
export const getSourceWebDoc = async (uri: string) => {
const result = await findWebDoc(uri);
console.log(result ? "existing doc found" : "existing doc NOT found");
- return result || Docs.Create.WebDocument(uri, { title: uri, _nativeWidth: 850, _nativeHeight: 962, _width: 400, UseCors: true }); // create and return a new Web doc with given uri if no matching docs are found
+ return result || Docs.Create.WebDocument(uri, { title: uri, _nativeWidth: 850, _nativeHeight: 962, _width: 400, useCors: true }); // create and return a new Web doc with given uri if no matching docs are found
};
@@ -34,7 +34,7 @@ export namespace Hypothesis {
const results: Doc[] = [];
await SearchUtil.Search("web", true).then(action(async (res: SearchUtil.DocSearchResult) => {
- const docs = await Promise.all(res.docs.map(async doc => (await Cast(doc.extendsDoc, Doc)) || doc));
+ const docs = res.docs;
const filteredDocs = docs.filter(doc =>
doc.author === Doc.CurrentUserEmail && doc.type === DocumentType.WEB && doc.data
);
@@ -60,6 +60,7 @@ export namespace Hypothesis {
DocumentLinksButton.AnnotationId = annotationId;
DocumentLinksButton.AnnotationUri = annotationUri;
DocumentLinksButton.StartLink = sourceDoc;
+ DocumentLinksButton.StartLinkView = undefined;
});
} else { // if a link has already been started, complete the link to sourceDoc
runInAction(() => {