summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenaud Chaput <renchap@gmail.com>2023-12-19 11:47:53 +0100
committerGitHub <noreply@github.com>2023-12-19 10:47:53 +0000
commit7b1d3907340d40bb60098b01bfb7b2e34ba9e7f1 (patch)
tree206b3bc85f5a5541c2fd682f44eb379d9439852d
parentfa987db73866109862ad10da8c1c1a643f1f4eba (diff)
Fixes dropdown target without a `buttonRef` (edit history) (#28427)
-rw-r--r--app/javascript/mastodon/components/dropdown_menu.jsx2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/javascript/mastodon/components/dropdown_menu.jsx b/app/javascript/mastodon/components/dropdown_menu.jsx
index de540b392ba..d9cbcc32e5d 100644
--- a/app/javascript/mastodon/components/dropdown_menu.jsx
+++ b/app/javascript/mastodon/components/dropdown_menu.jsx
@@ -257,7 +257,7 @@ class Dropdown extends PureComponent {
};
findTarget = () => {
- return this.target?.buttonRef?.current;
+ return this.target?.buttonRef?.current ?? this.target;
};
componentWillUnmount = () => {