Skip to content

Commit c6cf5e8

Browse files
committed
linting
1 parent 877069e commit c6cf5e8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/update.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ export const removeDuplicates = (entries: Relation[]): Relation[] => {
8787
// Ignore nulls
8888
if (id == null) continue
8989
// Ignore sources with one-to-many relations
90+
// eslint-disable-next-line unicorn/prefer-includes
9091
if (NonUniqueFields.some((field) => field === source)) continue
9192

9293
if (existing.get(source)!.has(id)) return false
@@ -152,8 +153,8 @@ export const updateRelations = async () => {
152153
logger.error(`... FAILED!`)
153154
}
154155
})
155-
if (error || "Error" in (results?.map((x) => x.status) || [])) {
156-
throw new Error(`failed to run 'migrateToLatest' ${error || ""}`)
156+
if (Boolean(error) || "Error" in (results?.map((x) => x.status) || [])) {
157+
throw new Error(`failed to run 'migrateToLatest' ${(error as string) || ""}`)
157158
}
158159
}
159160

0 commit comments

Comments
 (0)