Skip to content

Plugin throws an error on pattern editor #56

@smithjw1

Description

@smithjw1

Describe the bug
When you load the site editor to create a pattern, you see an error: The "vip-workflow-custom-status" plugin has encountered an error and cannot be rendered.

Image

In the console, this error is thrown:

react-dom.min.js?ver=18.3.1:2 TypeError: Cannot read properties of null (reading 'classList')
    at custom-status-block.js?ver=8ef85e6883db7d21ec7a:1

Looks like this useEffect is to blame.

To Reproduce

  • Activate the plugin
  • Load a pattern in the site editor

Expected behavior
When not in the Post Editor context, custom statuses are ignored.

Actual behavior
An error

Version of the plugin
trunk (github checkout)

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions