Skip to content
GitLab
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Commits on Source (2)
(fix) check if localEntities is not null
· 59d94d2c
Juan Manuel Solaro
authored
Nov 19, 2019
59d94d2c
Merge branch 'fix-null-is-not-an-object-in-entities-service' into 'release/3.12.0'
· 22f4360e
Martin Santangelo
authored
Nov 19, 2019
Fix null is not an object in entities service See merge request
!420
22f4360e
Hide whitespace changes
Inline
Side-by-side
src/common/services/entities.service.js
View file @
22f4360e
...
...
@@ -109,7 +109,12 @@ class EntitiesService {
// if we have urnsToFetch we try to load from the sql storage first
if
(
urnsToFetch
.
length
>
0
)
{
const
localEntities
=
await
entitiesStorage
.
readMany
(
urnsToFetch
);
urnsToFetch
=
_
.
difference
(
urnsToFetch
,
localEntities
.
map
((
m
:
any
):
string
=>
m
.
urn
));
if
(
localEntities
)
{
urnsToFetch
=
_
.
difference
(
urnsToFetch
,
localEntities
.
map
((
m
:
any
):
string
=>
m
.
urn
),
);
}
// we add to resync list
localEntities
.
forEach
((
entity
:
any
)
=>
{
urnsToResync
.
push
(
entity
.
urn
);
...
...