Skip to content

Commit

Permalink
fix(pipedrive): check if there is no data in dynamic-data
Browse files Browse the repository at this point in the history
  • Loading branch information
ridvanakca committed Oct 18, 2023
1 parent 0fca0ef commit e336fa8
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ export default {
`${$.auth.data.apiDomain}/api/v1/currencies`
);

if (!data?.data) {
return { data: [] };
}

if (data.data.length) {
for (const currency of data.data) {
currencies.data.push({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ export default {
);
params.start = data.additional_data?.pagination?.next_start;

if (!data?.data) {
return { data: [] };
}

if (data.data.length) {
for (const person of data.data) {
persons.data.push({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ export default {

const { data } = await $.http.get(`${$.auth.data.apiDomain}/api/v1/users`);

if (!data?.data) {
return { data: [] };
}

if (data.data.length) {
for (const user of data.data) {
users.data.push({
Expand Down

0 comments on commit e336fa8

Please sign in to comment.