aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionStackingView.tsx
diff options
context:
space:
mode:
authorGeireann Lindfield Roberts <60007097+geireann@users.noreply.github.com>2022-07-06 15:58:49 -0700
committerGeireann Lindfield Roberts <60007097+geireann@users.noreply.github.com>2022-07-06 15:58:49 -0700
commit03ef9aae8b91be25647dd2b9eb2dccc6ff435fcf (patch)
treebfdd705fe5e78b8159208c58016774658bcb022e /src/client/views/collections/CollectionStackingView.tsx
parentb476f81fbb7b7af32fdcc2fdd9fd1e2e2fc34014 (diff)
parent85e290ee7a666412570f2bae43a9b62d35b425f2 (diff)
Merge branch 'master' into geireann-eslint-prettier
Diffstat (limited to 'src/client/views/collections/CollectionStackingView.tsx')
-rw-r--r--src/client/views/collections/CollectionStackingView.tsx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/views/collections/CollectionStackingView.tsx b/src/client/views/collections/CollectionStackingView.tsx
index 44abbdb1c..37589974b 100644
--- a/src/client/views/collections/CollectionStackingView.tsx
+++ b/src/client/views/collections/CollectionStackingView.tsx
@@ -191,7 +191,7 @@ export class CollectionStackingView extends CollectionSubView<Partial<collection
smoothScroll(focusSpeed = doc.presTransition || doc.presTransition === 0 ? NumCast(doc.presTransition) : 500, this._mainCont!, localTop[1] + this._mainCont!.scrollTop);
}
}
- const endFocus = async (moved: boolean) => options?.afterFocus ? options?.afterFocus(moved) : ViewAdjustment.doNothing;
+ const endFocus = async (moved: boolean) => options?.afterFocus?.(moved) ?? ViewAdjustment.doNothing;
this.props.focus(this.rootDoc, {
willZoom: options?.willZoom, scale: options?.scale, afterFocus: (didFocus: boolean) =>
new Promise<ViewAdjustment>(res => setTimeout(async () => res(await endFocus(didFocus)), focusSpeed))