Use inherits() for class checking

This commit is contained in:
Elias Projahn 2021-12-13 09:50:45 +01:00
parent 207fc753a7
commit d98c70a205
4 changed files with 6 additions and 6 deletions

View file

@ -15,7 +15,7 @@
#'
#' @export
analyze <- function(preset, progress = NULL) {
if (class(preset) != "geposan_preset") {
if (!inherits(preset, "geposan_preset")) {
stop("Preset is invalid. Use geposan::preset() to create one.")
}