mirror of
https://github.com/element-hq/element-web
synced 2024-11-27 11:47:23 +03:00
remove redundant check and add comment
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
625ca96d86
commit
5450d6b9ca
1 changed files with 2 additions and 2 deletions
|
@ -16,10 +16,10 @@
|
||||||
|
|
||||||
function memberEventDiff(ev) {
|
function memberEventDiff(ev) {
|
||||||
const diff = {
|
const diff = {
|
||||||
// a Member Event is a State Event and so its State Key must not be undefined.
|
isMemberEvent: ev.getType() === 'm.room.member',
|
||||||
isMemberEvent: ev.getType() === 'm.room.member' && ev.getStateKey() !== undefined,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// If is not a Member Event then the other checks do not apply, so bail early.
|
||||||
if (!diff.isMemberEvent) return diff;
|
if (!diff.isMemberEvent) return diff;
|
||||||
|
|
||||||
const content = ev.getContent();
|
const content = ev.getContent();
|
||||||
|
|
Loading…
Reference in a new issue