Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit 26590ce

Browse files
#627 - Handle response correctly
1 parent d40fcb4 commit 26590ce

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

client/src/components/ProfileCard/helper.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ async function checkIfSkillExists(apiClient, skillProviderId, skillExternalId) {
2020
// TODO - handle error
2121
}
2222

23-
if (response.data) {
23+
if (response.data && response.data.length > 0) {
2424
return response.data;
2525
}
2626

@@ -35,7 +35,7 @@ async function checkIfSkillExists(apiClient, skillProviderId, skillExternalId) {
3535
}
3636

3737
if (response.data && response.data.skillProviderId === skillProviderId) {
38-
return response.data;
38+
return [response.data];
3939
}
4040

4141
return null;

0 commit comments

Comments
 (0)