From 7819f995debfbc71843a4ef831a6e4c4e298cdd0 Mon Sep 17 00:00:00 2001 From: "Zee V. (Philip)" Date: Mon, 16 May 2022 15:53:36 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20check=20if=20lastActivity=20is=20?= =?UTF-8?q?=E2=80=9Ctruthy=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We do this rather than checking that it’s not an empty string to make sure we capture the case where it might be undefined. Signed-off-by: Zee V. (Philip) --- .../src/GitLabDiscoveryProcessor.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/catalog-backend-module-gitlab/src/GitLabDiscoveryProcessor.ts b/plugins/catalog-backend-module-gitlab/src/GitLabDiscoveryProcessor.ts index 8fb6fbe4da..7f81683408 100644 --- a/plugins/catalog-backend-module-gitlab/src/GitLabDiscoveryProcessor.ts +++ b/plugins/catalog-backend-module-gitlab/src/GitLabDiscoveryProcessor.ts @@ -110,7 +110,7 @@ export class GitLabDiscoveryProcessor implements CatalogProcessor { }; const lastActivity = (await this.cache.get(this.getCacheKey())) as string; - if (lastActivity !== '') { + if (lastActivity) { opts.last_activity_after = lastActivity; }