Skip to content

Commit 2a60751

Browse files
committed
fix for bad iconSize being passed into the js hand-off
1 parent f6a943c commit 2a60751

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

R/layers.R

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -623,6 +623,14 @@ addMarkers <- function(
623623
icon$iconRetinaUrl <- b64EncodePackedIcons(packStrings(icon$iconRetinaUrl))
624624
icon$shadowUrl <- b64EncodePackedIcons(packStrings(icon$shadowUrl))
625625
icon$shadowRetinaUrl <- b64EncodePackedIcons(packStrings(icon$shadowRetinaUrl))
626+
627+
# if iconSize is of length 2 and there is one icon url, wrap the icon size in a list
628+
if (length(icon$iconSize) == 2) {
629+
if (is.numeric(icon$iconSize[[1]]) && is.numeric(icon$iconSize[[2]])) {
630+
icon$iconSize <- list(icon$iconSize)
631+
}
632+
}
633+
626634
icon <- filterNULL(icon)
627635
}
628636

0 commit comments

Comments
 (0)