Skip to content

Commit 5505a99

Browse files
committed
handle NULL value for dataExpanded state of sidebarMenu
1 parent ba473f7 commit 5505a99

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

R/dashboardSidebar.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ menuItem <- function(text, ..., icon = NULL, badgeLabel = NULL, badgeColor = "gr
402402
)
403403
}
404404

405-
dataExpanded <- restoreInput(id = "itemExpanded", default = "")
405+
dataExpanded <- restoreInput(id = "itemExpanded", default = "") %OR% "" # prevent this from being NULL
406406
cls <- if (dataExpanded == paste0("shiny-tab-", tabName)) " menu-open" else ""
407407
display <- if (cls != "") "block" else "none"
408408

0 commit comments

Comments
 (0)