aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/linking/LinkFollowBox.tsx
diff options
context:
space:
mode:
authorbob <bcz@cs.brown.edu>2019-08-29 13:48:15 -0400
committerbob <bcz@cs.brown.edu>2019-08-29 13:48:15 -0400
commit0b43aead85c0de5877c0ecea7703acb6f2539249 (patch)
tree2c779a42fa066913437de11e5c05f040919bc921 /src/client/views/linking/LinkFollowBox.tsx
parent7641b0bc801bb135e4b710a60a50ff1d08b49f1c (diff)
fixed re-opening linkbox. adding linkbox dragging.
Diffstat (limited to 'src/client/views/linking/LinkFollowBox.tsx')
-rw-r--r--src/client/views/linking/LinkFollowBox.tsx5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/client/views/linking/LinkFollowBox.tsx b/src/client/views/linking/LinkFollowBox.tsx
index 54670e2c7..07f07f72a 100644
--- a/src/client/views/linking/LinkFollowBox.tsx
+++ b/src/client/views/linking/LinkFollowBox.tsx
@@ -38,7 +38,7 @@ enum FollowOptions {
export class LinkFollowBox extends React.Component<FieldViewProps> {
public static LayoutString() { return FieldView.LayoutString(LinkFollowBox); }
- public static Instance: LinkFollowBox;
+ public static Instance: LinkFollowBox | undefined;
@observable static linkDoc: Doc | undefined = undefined;
@observable static destinationDoc: Doc | undefined = undefined;
@observable static sourceDoc: Doc | undefined = undefined;
@@ -557,7 +557,8 @@ export class LinkFollowBox extends React.Component<FieldViewProps> {
async close() {
let res = await DocListCastAsync((CurrentUserUtils.UserDocument.overlays as Doc).data);
- if (res) res.splice(res.indexOf(LinkFollowBox.Instance.props.Document), 1);
+ if (res) res.splice(res.indexOf(LinkFollowBox.Instance!.props.Document), 1);
+ LinkFollowBox.Instance = undefined;
}
render() {