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.`, );