diff --git a/R/toolGetMapping.R b/R/toolGetMapping.R index 3438bdd6..0aff43c7 100644 --- a/R/toolGetMapping.R +++ b/R/toolGetMapping.R @@ -32,11 +32,9 @@ toolGetMapping <- function(name, type = NULL, where = NULL, if (isWrapperActive("wrapperChecks")) { for (w in c("downloadSource", "readSource", "calcOutput", "retrieveData")) { - if (isWrapperActive(w)) { - if (is.null(where)) { - warning("argument 'where' should be set when calling toolGetMapping from within a madrat function.") - break - } + if (isWrapperActive(w) && is.null(where)) { + warning("argument 'where' should be set when calling toolGetMapping from within a madrat function.") + break } } }