Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Style theme variations: add property extraction and merge utils #58803

Merged
merged 10 commits into from Feb 13, 2024
Expand Up @@ -26,6 +26,7 @@ import { store as coreStore } from '@wordpress/core-data';
*/
import { useSupportedStyles } from '../../components/global-styles/hooks';
import { unlock } from '../../lock-unlock';
import cloneDeep from '../../utils/clone-deep';
ramonjd marked this conversation as resolved.
Show resolved Hide resolved

const { cleanEmptyObject, GlobalStylesContext } = unlock(
blockEditorPrivateApis
Expand Down Expand Up @@ -275,10 +276,6 @@ function setNestedValue( object, path, value ) {
return object;
}

function cloneDeep( object ) {
return ! object ? {} : JSON.parse( JSON.stringify( object ) );
}

function PushChangesToGlobalStylesControl( {
name,
attributes,
Expand Down