File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments