mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 13:33:24 +00:00
server_events_dispatch: Refactor 'reaction' case to use switch/case.
This commit is contained in:
@@ -150,10 +150,13 @@ export function dispatch_normal_event(event) {
|
||||
}
|
||||
|
||||
case "reaction":
|
||||
if (event.op === "add") {
|
||||
reactions.add_reaction(event);
|
||||
} else if (event.op === "remove") {
|
||||
reactions.remove_reaction(event);
|
||||
switch (event.op) {
|
||||
case "add":
|
||||
reactions.add_reaction(event);
|
||||
break;
|
||||
case "remove":
|
||||
reactions.remove_reaction(event);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user