Skip to content

Commit

Permalink
added warning if RStudio < 1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
pvictor committed Apr 9, 2021
1 parent 7c01556 commit 4a34a7a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions R/esquisser.R
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ esquisser <- function(data = NULL,
controls = c("labs", "parameters", "appearance", "filters", "code"),
viewer = getOption(x = "esquisse.viewer", default = "dialog")) {
viewer <- match.arg(viewer, choices = c("dialog", "pane", "browser"))

rs_version <- try(rstudioapi::versionInfo()$version, silent = TRUE)
if (!inherits(rs_version, "try-error") && rs_version < "1.2") {
warning("Esquisse may not work properly, try updating RStudio.", call. = FALSE)
}

res_data <- get_data(data, name = deparse(substitute(data)))
if (!is.null(res_data$esquisse_data)) {
Expand Down

0 comments on commit 4a34a7a

Please sign in to comment.