Skip to content

Commit

Permalink
Offline viewer should always be a function
Browse files Browse the repository at this point in the history
  • Loading branch information
cpsievert committed Aug 26, 2015
1 parent fed7b10 commit 4969d70
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion R/offline.R
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,6 @@ get_browser <- function() {
# default web browser
if (is.null(browseR) || !is.function(browseR) ||
inherits(try(browseR('http://www.rstudio.com'), silent = TRUE), 'try-error'))
browseR = getOption("browser")
browseR = browseURL
browseR
}
2 changes: 1 addition & 1 deletion R/print.R
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ print.offline <- function(x, ...) {
}
index <- file.path(d, "index.html")
res <- writeLines(html, index)
if (!is.null(x$viewer)) x$viewer(index)
if (is.function(x$viewer)) x$viewer(index)
}

#' Embed a plotly iframe into an R markdown document via \code{knit_print}
Expand Down

0 comments on commit 4969d70

Please sign in to comment.