Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/editor/src/store/selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -2056,7 +2056,7 @@ export function isPostLocked( state ) {
* @return {boolean} Is locked.
*/
export function isPostSavingLocked( state ) {
return state.postSavingLock.length > 0;
return Object.keys( state.postSavingLock ).length > 0;
}

/**
Expand Down
4 changes: 2 additions & 2 deletions packages/editor/src/store/test/selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -964,7 +964,7 @@ describe( 'selectors', () => {
describe( 'isPostSavingLocked', () => {
it( 'should return true if the post has postSavingLocks', () => {
const state = {
postSavingLock: [ { 1: true } ],
postSavingLock: { example: true },
currentPost: {},
saving: {},
};
Expand All @@ -974,7 +974,7 @@ describe( 'selectors', () => {

it( 'should return false if the post has no postSavingLocks', () => {
const state = {
postSavingLock: [],
postSavingLock: {},
currentPost: {},
saving: {},
};
Expand Down