Skip to content

User mention autocompletion fails if avatar_urls array is not set #18258

Closed
@glendaviesnz

Description

Describe the bug

Currently if a site is returning false for get_option( 'show_avatars' ) the @ mentions autocompletion fails due to a Cannot read property '24' of undefined error.

To reproduce
Steps to reproduce the behavior:

  1. Set the show_avatars option to false for a given site
  2. Open dev tools console
  3. In the given site add a new post and try to mention a user by typing @joemaller
  4. User autocomplete dropdown does not display and error can be seen in console

Expected behavior
If a site has show_avatars set to false then the user autocomplete dropdown should still display but without avatars

Screenshots
user-auto-complete

Desktop :

  • OS: OSX
  • Browser: Chrome
  • Version 78.0.3904.70

Can be replicated on 6.8 and latest Gutenberg master.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

[Type] BugAn existing feature does not function as intended

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions