Skip to content

Commit

Permalink
fixed jsonlite NULL error
Browse files Browse the repository at this point in the history
  • Loading branch information
chrispyles committed Aug 7, 2021
1 parent c3d7503 commit 521799c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion R/ottr.r
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ TestCaseResult = R6::R6Class(
to_list = function() {
return(list(
passed = self$passed,
error = self$error$message,
# don't put NULL because jsonlite turns it into {}
error = ifelse(is.null(self$error$message), "", self$error$message),
test_case = self$test_case$to_list()
))
}
Expand Down

0 comments on commit 521799c

Please sign in to comment.