Skip to content

Editable.changeFormats() should update setState #1124

Closed

Description

Currently:
Around line 368 inside changeFormats()

this.setState( {
	formats: merge( {}, this.state.formats, formats ),
} );

Should be:

this.setState( ( previousState ) => ( {
	formats: merge( {}, previousState.formats, formats ),
} ) );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Good First IssueAn issue that's suitable for someone looking to contribute for the first time[Type] EnhancementA suggestion for improvement.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions