This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Compares two objects and returns the differences, or null if they're the same | |
* @param {Object} original - Original form data | |
* @param {Object} current - Current form data | |
* @returns {Object|null} Object containing only the changed fields, or null if no changes | |
*/ | |
function getObjectDiff(original, current) { | |
const changes = {}; | |
for (const [key, value] of Object.entries(current)) { |