leaflet
leaflet copied to clipboard
Fix error in safeLabel for formula label with empty data
When adding an empty simple features dataframe to a map and specifying a formula-based label, methods like addPolygons error, because safeLabel fails on empty inputs with
Error in sum(sapply(label, function(x) { :
invalid 'type' (list) of argument
(tries to sum an empty list)
Example of failing safeLabel call
safeLabel(~X, data.frame(X=1:10) %>% head(0))
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
0 out of 2 committers have signed the CLA.
:x: Maciej Ziarkowski
:x: mz8i
Maciej Ziarkowski seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.