mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-21 09:38:01 +02:00
16 lines
373 B
TypeScript
16 lines
373 B
TypeScript
export default function propsHaveChanged(previous: any, next: any): boolean {
|
|
if (!previous && next) return true;
|
|
if (previous && !next) return true;
|
|
if (!previous && !next) return false;
|
|
|
|
if (Object.keys(previous).length !== Object.keys(next).length) return true;
|
|
|
|
for (const n in previous) {
|
|
if (previous[n] !== next[n]) {
|
|
return true;
|
|
}
|
|
}
|
|
|
|
return false;
|
|
}
|