Prevent using the editorStore when it isn't available (see #69) #71
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi @mtoensing,
Here's my second attempt at fixing #69. I did some checks and now:
It still doesn't work from the widgets screen but that makes sense as there is no related post available.
Please, double check before merging, just in case I'm still missing something. Feel free to discard both the PR and the issue if you think it doesn't worth the fix.
Here's what I did:
editorStorewith a constant that catches it if it's available. That causesnpm run buildto not include wp-editor as a dependency but still uses it when it's available (ex. Gutenberg editor).editorStoreisn't used when it's not available (ex. the widget screen).Thanks for the patience!