Skip to content

A free and open source instant messaging and VoIP chat app built for friends, groups, and communities.

TypeScript fluxerfluxerapp

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

Hampus00bf74cef5cd
diff --git a/fluxer_app/src/features/channel/models/Channel.ts b/fluxer_app/src/features/channel/models/Channel.ts
index 70c7283cd..7ef14b7a8 100644
--- a/fluxer_app/src/features/channel/models/Channel.ts
+++ b/fluxer_app/src/features/channel/models/Channel.ts
@@ -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;
}
}