diff options
| author | Geireann Lindfield Roberts <60007097+geireann@users.noreply.github.com> | 2021-09-09 23:48:52 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-09-09 23:48:52 -0400 |
| commit | bc35345fdf72f26c5c94909180109a998c1513c0 (patch) | |
| tree | 4000ee3540ebb84db85ffcfb8e09e43ec0fe92fc /src/client/util/HypothesisUtils.ts | |
| parent | 2d2e027f11253834a337680bbfd1ac549bb2a1f0 (diff) | |
| parent | 9d177851ecaaea1a89ac9b7de1cec16368603eaa (diff) | |
Merge pull request #35 from brown-dash/menu_updates_geireann
Menu updates geireann
Diffstat (limited to 'src/client/util/HypothesisUtils.ts')
| -rw-r--r-- | src/client/util/HypothesisUtils.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/util/HypothesisUtils.ts b/src/client/util/HypothesisUtils.ts index 635673025..e910a9118 100644 --- a/src/client/util/HypothesisUtils.ts +++ b/src/client/util/HypothesisUtils.ts @@ -29,7 +29,7 @@ export namespace Hypothesis { * Search for a WebDocument whose url field matches the given uri, return undefined if not found */ export const findWebDoc = async (uri: string) => { - const currentDoc = SelectionManager.Views().length && SelectionManager.Views()[0].props.Document; + const currentDoc = SelectionManager.Docs().lastElement(); if (currentDoc && Cast(currentDoc.data, WebField)?.url.href === uri) return currentDoc; // always check first whether the currently selected doc is the annotation's source, only use Search otherwise const results: Doc[] = []; |
