fix(app): handle swapped overwrites when comparing channels (#2949)

This commit is contained in:
Hampus
2026-09-24 23:38:04 +02:00
committed by GitHub
parent c1c45d835f
commit 00bf74cef5
@@ -303,7 +303,8 @@ export class Channel {
const otherOverwrites = Object.keys(other.permissionOverwrites);
if (thisOverwrites.length !== otherOverwrites.length) return false;
for (const key of thisOverwrites) {
if (!this.permissionOverwrites[key].equals(other.permissionOverwrites[key])) {
const otherOverwrite = other.permissionOverwrites[key];
if (otherOverwrite == null || !this.permissionOverwrites[key].equals(otherOverwrite)) {
return false;
}
}