Skip to content

Commit

Permalink
Fixes dropdown target without a buttonRef (edit history) (mastodon#…
Browse files Browse the repository at this point in the history
  • Loading branch information
renchap authored Dec 19, 2023
1 parent fa987db commit 7b1d390
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/javascript/mastodon/components/dropdown_menu.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ class Dropdown extends PureComponent {
};

findTarget = () => {
return this.target?.buttonRef?.current;
return this.target?.buttonRef?.current ?? this.target;
};

componentWillUnmount = () => {
Expand Down

0 comments on commit 7b1d390

Please sign in to comment.