Browse Source

Fix "Edit profile" on the account action bar (#3222)

closed-social-glitch-2
unarist 7 years ago
committed by Eugen Rochko
parent
commit
07af8c05fd
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      app/javascript/mastodon/components/dropdown_menu.js

+ 4
- 1
app/javascript/mastodon/components/dropdown_menu.js View File

@ -33,11 +33,14 @@ class DropdownMenu extends React.PureComponent {
const i = Number(e.currentTarget.getAttribute('data-index'));
const { action, to } = this.props.items[i];
e.preventDefault();
// Don't call e.preventDefault() when the item uses 'href' property.
// ex. "Edit profile" on the account action bar
if (typeof action === 'function') {
e.preventDefault();
action();
} else if (to) {
e.preventDefault();
this.context.router.push(to);
}

Loading…
Cancel
Save