Skip to content

Commit 1aaa8f1

Browse files
committed
external-services-connector: improve caching in getPersons
previously we wouldn't cache a type when we didn't got any results back from the services
1 parent f160830 commit 1aaa8f1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

packages/external-services-connector/server/functions.coffee

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,7 @@ getPersons = (query, type = undefined, userId) ->
429429

430430
# cache newely fetched items by type.
431431
for type in types
432+
items = _.filter fetched, { type }
432433
personCache.push
433434
query: query
434435
userId: userId

0 commit comments

Comments
 (0)