code refactor

This commit is contained in:
saurabhg772244
2024-09-17 22:33:10 +05:30
parent 522de3abd8
commit 3f5afe8daf

View File

@@ -814,17 +814,17 @@ export const lex = {
}; };
const getTypeFromVertex = (vertex: FlowVertex) => { const getTypeFromVertex = (vertex: FlowVertex) => {
if (vertex?.img) { if (vertex.img) {
return 'imageSquare'; return 'imageSquare';
} }
if (vertex?.icon) { if (vertex.icon) {
if (vertex?.form === 'circle') { if (vertex.form === 'circle') {
return 'iconCircle'; return 'iconCircle';
} }
if (vertex?.form === 'square') { if (vertex.form === 'square') {
return 'iconSquare'; return 'iconSquare';
} }
if (vertex?.form === 'rounded') { if (vertex.form === 'rounded') {
return 'iconRounded'; return 'iconRounded';
} }
return 'icon'; return 'icon';