Skip to content

Commit

Permalink
refactor: Polish attribute name
Browse files Browse the repository at this point in the history
  • Loading branch information
miyanokomiya committed Nov 9, 2024
1 parent f67a728 commit d7af510
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils/entities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,14 @@ export function shouldEntityOrderUpdate<T extends Entity>(patchInfo: EntityPatch

export function shouldEntityTreeUpdate<T extends Entity>(
patchInfo: EntityPatchInfo<T>,
hasParent: (id: string, patch: Partial<T>) => boolean,
hasParentKey: (id: string, patch: Partial<T>) => boolean,
): boolean {
if (!!patchInfo.add?.length || !!patchInfo.delete?.length) return true;
if (!patchInfo.update) return false;

for (const id in patchInfo.update) {
const patch = patchInfo.update[id];
if (patch.findex || hasParent(id, patch)) {
if (patch.findex || hasParentKey(id, patch)) {
return true;
}
}
Expand Down

0 comments on commit d7af510

Please sign in to comment.