app/frontend/editor/misc/utils.js in maglevcms-1.1.5 vs app/frontend/editor/misc/utils.js in maglevcms-1.1.6

- old
+ new

@@ -123,5 +123,19 @@ } } return result } + +export const hasChanged = (newObject, oldObject, property) => { + return ( + !!oldObject[property] && + !!newObject[property] && + oldObject[property] !== newObject[property] + ) +} + +export const hasAnyChanged = (newObject, oldObject, ...properties) => { + return properties.some((property) => + hasChanged(newObject, oldObject, property), + ) +}