Skip to content

Commit eb47af6

Browse files
authored
Merge pull request #604 from ecency/seer/refactor/tag-type-check
Improve tag filtering for similar entries
2 parents 675c059 + c6d01be commit eb47af6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/sdk/src/modules/search/queries/get-similar-entries-query-options.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ function buildQuery(entry: Entry, retry = 3) {
2020
// 3 tags and decrease until there is enough relevant posts
2121
if (json_metadata && json_metadata.tags && Array.isArray(json_metadata.tags)) {
2222
tags = json_metadata.tags
23-
.filter((tag) => tag && tag !== "")
23+
.filter((tag) => tag && tag !== "" && typeof tag === "string")
2424
.filter((tag) => !tag.startsWith("hive-")) // filter out communities
2525
.filter((_tag, ind) => ind < +retry)
2626
.join(",");

0 commit comments

Comments
 (0)