From a3a49fb088dde02f11f024d7bd355a046c558e42 Mon Sep 17 00:00:00 2001 From: blam Date: Wed, 20 Apr 2022 14:29:27 +0200 Subject: [PATCH] chore: fixing types for search stitching Signed-off-by: blam --- plugins/catalog-backend/src/stitching/Stitcher.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/catalog-backend/src/stitching/Stitcher.ts b/plugins/catalog-backend/src/stitching/Stitcher.ts index c31052c01e..cf65a14fee 100644 --- a/plugins/catalog-backend/src/stitching/Stitcher.ts +++ b/plugins/catalog-backend/src/stitching/Stitcher.ts @@ -213,7 +213,7 @@ export class Stitcher { // to write the search index. const searchEntries = buildEntitySearch(entityId, entity); - const rowsChanged = await this.database( + const amountOfRowsChanged = await this.database( 'final_entities', ) .update({ @@ -225,7 +225,7 @@ export class Stitcher { .onConflict('entity_id') .merge(['final_entity', 'hash']); - if (rowsChanged.length === 0) { + if (amountOfRowsChanged === 0) { this.logger.debug( `Entity ${entityRef} is already processed, skipping write.`, );