Skip to content

Commit

Permalink
Fix for issue #186 - check that list has length > 0 before checking c…
Browse files Browse the repository at this point in the history
…lass
  • Loading branch information
dcomtois committed Aug 20, 2023
1 parent 3e63884 commit d00f80b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/print.list.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ print.list <- function(x,
escape.pipe = st_options("escape.pipe"),
...) {

if (inherits(x[[1]], "summarytools")) {
if (length(x) > 0 && inherits(x[[1]], "summarytools")) {

view(x,
method = method,
Expand Down

0 comments on commit d00f80b

Please sign in to comment.