Skip to content

Commit 3b6abde

Browse files
aduthyouknowriad
authored andcommitted
Block Editor: Resolve settings undefined error on initial state
1 parent f0ab370 commit 3b6abde

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/block-editor/src/store/reducer.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ export function isUpdatingSameBlockAttribute( action, lastAction ) {
205205
*/
206206
const withPostMetaUpdateCacheReset = ( reducer ) => ( state, action ) => {
207207
const newState = reducer( state, action );
208-
const previousMetaValues = get( state.settings.__experimentalMetaSource, [ 'value' ] );
208+
const previousMetaValues = get( state, [ 'settings', '__experimentalMetaSource', 'value' ] );
209209
const nextMetaValues = get( newState.settings.__experimentalMetaSource, [ 'value' ] );
210210
// If post meta values change, reset the cache key for all blocks
211211
if ( previousMetaValues !== nextMetaValues ) {

0 commit comments

Comments
 (0)