js: Add braces to case blocks declaring variables.

This helps to prepare for the migration of `var` to `let` and `const`.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
Anders Kaseorg
2019-10-25 14:55:37 -07:00
committed by Tim Abbott
parent 12bd3c04c0
commit a547413347
8 changed files with 36 additions and 19 deletions

View File

@@ -78,7 +78,7 @@ function do_hashchange_normal(from_reload) {
// be #ABCD.
var hash = window.location.hash.split("/");
switch (hash[0]) {
case "#narrow":
case "#narrow": {
ui_util.change_tab_to("#home");
var operators = hash_util.parse_narrow(hash);
if (operators === undefined) {
@@ -103,6 +103,7 @@ function do_hashchange_normal(from_reload) {
narrow.activate(operators, narrow_opts);
floating_recipient_bar.update();
return true;
}
case "":
case "#":
activate_home_tab();