diff --git a/src/wp-includes/js/wp-api.js b/src/wp-includes/js/wp-api.js index d45219af72..a14d21fae6 100644 --- a/src/wp-includes/js/wp-api.js +++ b/src/wp-includes/js/wp-api.js @@ -1017,7 +1017,7 @@ success: function( newSchemaModel ) { // Store a copy of the schema model in the session cache if available. - if ( ! _.isUndefined( sessionStorage ) && wpApiSettings.cacheSchema ) { + if ( ! _.isUndefined( sessionStorage ) && ( _.isUndefined( wpApiSettings.cacheSchema ) || wpApiSettings.cacheSchema ) ) { try { sessionStorage.setItem( 'wp-api-schema-model' + model.get( 'apiRoot' ) + model.get( 'versionString' ), JSON.stringify( newSchemaModel ) ); } catch ( error ) {