Skip to content

Commit 4969d70

Browse files
committed
Offline viewer should always be a function
1 parent fed7b10 commit 4969d70

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

R/offline.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,6 @@ get_browser <- function() {
114114
# default web browser
115115
if (is.null(browseR) || !is.function(browseR) ||
116116
inherits(try(browseR('http://www.rstudio.com'), silent = TRUE), 'try-error'))
117-
browseR = getOption("browser")
117+
browseR = browseURL
118118
browseR
119119
}

R/print.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ print.offline <- function(x, ...) {
6262
}
6363
index <- file.path(d, "index.html")
6464
res <- writeLines(html, index)
65-
if (!is.null(x$viewer)) x$viewer(index)
65+
if (is.function(x$viewer)) x$viewer(index)
6666
}
6767

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

0 commit comments

Comments
 (0)