Skip to content

Commit

Permalink
fix: check there is a theme before searching for fonts
Browse files Browse the repository at this point in the history
  • Loading branch information
davidgohel committed Feb 24, 2024
1 parent 2f8aba4 commit 8dcef40
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Package: ggiraph
Type: Package
Title: Make 'ggplot2' Graphics Interactive
Description: Create interactive 'ggplot2' graphics using 'htmlwidgets'.
Version: 0.8.9.003
Version: 0.8.9.004
Authors@R: c(
person("David", "Gohel", role = c("aut", "cre"),
email = "[email protected]"),
Expand Down
1 change: 1 addition & 0 deletions R/fonts.R
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ fortify_font_db <- function(){
}

list_theme_fonts <- function(gg) {
if(is.null(names(gg)) || is.null(gg[["theme"]])) return(character())
element_text_set <- Filter(f = function(x) inherits(x, "element_text") && !is.null(x$family), gg[["theme"]])
fonts <- vapply(
X = element_text_set,
Expand Down

0 comments on commit 8dcef40

Please sign in to comment.