Skip to content

Commit d280db7

Browse files
committed
fix(lib/publications): check error before indexing array
1 parent 71cd6c5 commit d280db7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/lib/PostgresMetaPublications.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,9 @@ end $$;
226226
with publications as (${publicationsSql}) select * from publications where name = (select name from pg_meta_publication_tmp);
227227
`
228228
const { data, error } = await this.query(sql)
229+
if (error) {
230+
return { data: null, error }
231+
}
229232
return { data: data[0], error }
230233
}
231234

0 commit comments

Comments
 (0)