Skip to content

Commit

Permalink
coerce to numeric when appropriate
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Patrick Kyle committed Nov 1, 2019
1 parent b09c9e5 commit ba7c015
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions R/dash.R
Original file line number Diff line number Diff line change
Expand Up @@ -649,6 +649,8 @@ Dash <- R6::R6Class(
getServerParam <- function(value, type, default) {
if (!is.null(value) && toupper(value) %in% c("TRUE", "FALSE"))
value <- as.logical(toupper(value))
if (type == "numeric")
value <- as.numeric(value)
if (value != "" && length(value) != 0 && mode(value) == type && !is.na(value)) {
return(value)
} else {
Expand Down

0 comments on commit ba7c015

Please sign in to comment.