From 740968eac0da06f3e9ffef6f7cec1978ebdc0ea9 Mon Sep 17 00:00:00 2001 From: Norwin Roosen Date: Fri, 26 Apr 2019 19:34:38 +0200 Subject: [PATCH] fixup! more robust error handling when API not available (#26) --- R/api.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/api.R b/R/api.R index 0ec8ad1..273c7f2 100644 --- a/R/api.R +++ b/R/api.R @@ -102,7 +102,7 @@ osem_get_resource = function (host, path, ..., type = 'parsed', progress = T, ca } res = osem_request_(host, path, query, type, progress) - if (!is.na(res) && !is.na(cache)) saveRDS(res, filename) + if (!is.na(cache)) saveRDS(res, filename) res }