Skip to content

Commit

Permalink
fix : optim tags concatenation
Browse files Browse the repository at this point in the history
  • Loading branch information
cspriet committed Dec 20, 2023
1 parent f5ffbd4 commit b77cf07
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/services/users.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,10 @@ export const upsertUsersFromApi = async (
const fcuTags = airtableUserAPI
? (airtableUserAPI.get('Tags FCU') as string[])
: [];
let allGestionnaires = gestionnaires;
if (airtableUserAPI && fcuTags && fcuTags.length > 0) {
allGestionnaires = allGestionnaires.concat(fcuTags);
}
const allGestionnaires =
airtableUserAPI && fcuTags && fcuTags.length > 0
? gestionnaires.concat(fcuTags)
: gestionnaires;
const promises: Promise<any>[] = [
db('users')
.insert({
Expand Down

0 comments on commit b77cf07

Please sign in to comment.