fix: add optional chaining when board list is empty
This commit is contained in:
@@ -6,7 +6,7 @@ export default {
|
|||||||
const groups = {
|
const groups = {
|
||||||
data: [],
|
data: [],
|
||||||
};
|
};
|
||||||
const boardId = $.step.parameters.parameters.boardId;
|
const boardId = $.step.parameters.boardId;
|
||||||
|
|
||||||
if (!boardId) {
|
if (!boardId) {
|
||||||
return groups;
|
return groups;
|
||||||
@@ -26,7 +26,7 @@ export default {
|
|||||||
|
|
||||||
const { data } = await $.http.post('/', body);
|
const { data } = await $.http.post('/', body);
|
||||||
|
|
||||||
if (data.data.boards[0].groups.length) {
|
if (data.data.boards[0]?.groups.length) {
|
||||||
for (const group of data.data.boards[0].groups) {
|
for (const group of data.data.boards[0].groups) {
|
||||||
groups.data.push({
|
groups.data.push({
|
||||||
value: group.id,
|
value: group.id,
|
||||||
|
|||||||
Reference in New Issue
Block a user