Apply suggestions from code review

Co-authored-by: Alois Klink <alois@aloisklink.com>
This commit is contained in:
Sidharth Vinod
2022-09-14 09:02:34 +05:30
committed by GitHub
parent 4fc4d71350
commit 3dff5a90f1

View File

@@ -634,13 +634,13 @@ export const updateLayoutConfig = function (typeC4Shape, c4ShapeInRowParam, c4Bo
let c4BoundaryInRowValue = c4BoundaryInRow; let c4BoundaryInRowValue = c4BoundaryInRow;
if (typeof c4ShapeInRowParam === 'object') { if (typeof c4ShapeInRowParam === 'object') {
let [, value] = Object.entries(c4ShapeInRowParam)[0]; const value = Object.values(c4ShapeInRowParam)[0];
c4ShapeInRowValue = parseInt(value); c4ShapeInRowValue = parseInt(value);
} else { } else {
c4ShapeInRowValue = parseInt(c4ShapeInRowParam); c4ShapeInRowValue = parseInt(c4ShapeInRowParam);
} }
if (typeof c4BoundaryInRowParam === 'object') { if (typeof c4BoundaryInRowParam === 'object') {
let [, value] = Object.entries(c4BoundaryInRowParam)[0]; const value = Object.values(c4BoundaryInRowParam)[0];
c4BoundaryInRowValue = parseInt(value); c4BoundaryInRowValue = parseInt(value);
} else { } else {
c4BoundaryInRowValue = parseInt(c4BoundaryInRowParam); c4BoundaryInRowValue = parseInt(c4BoundaryInRowParam);