Skip to content

Commit 45b73a3

Browse files
committed
fix(tables_figures): add missing !is.null()
accidentally removed when refactoring R code for name mapping, colour var needs to check if var is null, not just mapping
1 parent 22a3a4e commit 45b73a3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pages/experiments/tables_figures.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -726,7 +726,7 @@ plot_metrics <- function(
726726
# Helper to map a variable to display name if available in `name_mappings`.
727727
# Just uses variable name if no mapping is found.
728728
get_name <- function(var) {
729-
if (!is.null(name_mappings[[var]])) {
729+
if (!is.null(var) && !is.null(name_mappings[[var]])) {
730730
name_mappings[[var]]
731731
} else {
732732
var

0 commit comments

Comments
 (0)