Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

server_events_dispatch: Refactor 'reaction' case to use switch/case.

YashRE42bf864221164e
diff --git a/static/js/server_events_dispatch.js b/static/js/server_events_dispatch.js
index bce34ec4500..86befe6a859 100644
--- a/static/js/server_events_dispatch.js
+++ b/static/js/server_events_dispatch.js
@@ -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;