fix(pipedrive): Add guard for not having any organizations
This commit is contained in:
@@ -15,6 +15,10 @@ export default {
|
|||||||
`${$.auth.data.apiDomain}/api/v1/organizations`
|
`${$.auth.data.apiDomain}/api/v1/organizations`
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (!data?.data) {
|
||||||
|
return { data: [] };
|
||||||
|
}
|
||||||
|
|
||||||
if (data.data.length) {
|
if (data.data.length) {
|
||||||
for (const organization of data.data) {
|
for (const organization of data.data) {
|
||||||
organizations.data.push({
|
organizations.data.push({
|
||||||
|
Reference in New Issue
Block a user