aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/ComponentDecorations.tsx
diff options
context:
space:
mode:
authoralyssaf16 <alyssa_feinberg@brown.edu>2025-01-13 17:25:40 -0500
committeralyssaf16 <alyssa_feinberg@brown.edu>2025-01-13 17:25:40 -0500
commit22daafa9c505eb9bffb8604be0924a7450d20113 (patch)
tree30a77425f3bb989e3e100366660c86342f1bf67c /src/client/views/ComponentDecorations.tsx
parent9e3ca3743437396a16b3e3f402e76336b056d6b7 (diff)
parent10a89be0b184df2750a4b3eceb48db205cb83e95 (diff)
Merge branch 'master' into alyssa-agent
Diffstat (limited to 'src/client/views/ComponentDecorations.tsx')
-rw-r--r--src/client/views/ComponentDecorations.tsx6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/client/views/ComponentDecorations.tsx b/src/client/views/ComponentDecorations.tsx
index 929b549e0..28e9d9792 100644
--- a/src/client/views/ComponentDecorations.tsx
+++ b/src/client/views/ComponentDecorations.tsx
@@ -5,11 +5,7 @@ import { DocumentView } from './nodes/DocumentView';
@observer
export class ComponentDecorations extends React.Component<{ boundsTop: number; boundsLeft: number }, { value: string }> {
- // eslint-disable-next-line no-use-before-define
- static Instance: ComponentDecorations;
-
render() {
- const seldoc = DocumentView.Selected().lastElement();
- return seldoc?.ComponentView?.componentUI?.(this.props.boundsLeft, this.props.boundsTop) ?? null;
+ return DocumentView.Selected().map(seldoc => seldoc?.ComponentView?.componentUI?.(this.props.boundsLeft, this.props.boundsTop) ?? null);
}
}