golden hour
/var/www/html/wp-content/plugins/woocommerce/packages/woocommerce-blocks/assets/js/data/utils
⬆️ Go Up
Upload
File/Folder
Size
Actions
has-in-state.js
379 B
Del
OK
index.js
113 B
Del
OK
update-state.js
476 B
Del
OK
Edit: update-state.js
/** * External dependencies */ import { setWith, clone } from 'lodash'; /** * Utility for updating state and only cloning objects in the path that changed. * * @param {Object} state The state being updated * @param {Array} path The path being updated * @param {*} value The value to update for the path * * @return {Object} The new state */ export default function updateState( state, path, value ) { return setWith( clone( state ), path, value, clone ); }
Save