Skip to content

Commit

Permalink
Bugfix: exit listener for editor saves when core/editor is defined
Browse files Browse the repository at this point in the history
  • Loading branch information
matt committed Jan 12, 2024
1 parent 1056ed5 commit ef17f70
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/editorApp/checkPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,10 @@ export const init = () => {
if (wp.data !== undefined && wp.data.subscribe !== undefined) {
wp.data.subscribe(() => {


if(wp.data.select('core/editor') === undefined) {
return;
}

if (wp.data.select('core/editor').isAutosavingPost()) {
autosaving = true;
}
Expand Down

0 comments on commit ef17f70

Please sign in to comment.