chore: Simplify dataFetcher helper functions

This commit is contained in:
Sidharth Vinod
2024-07-27 15:18:09 +05:30
parent b79191e39c
commit cdca63dcfe

View File

@@ -198,10 +198,10 @@ export const dataFetcher = (
if (itemId !== 'root') { if (itemId !== 'root') {
let shape = SHAPE_STATE; let shape = SHAPE_STATE;
// The if === true / false can be removed if we can guarantee that the parsedItem.start is always a boolean
if (parsedItem.start === true) { if (parsedItem.start === true) {
shape = SHAPE_START; shape = SHAPE_START;
} } else if (parsedItem.start === false) {
if (parsedItem.start === false) {
shape = SHAPE_END; shape = SHAPE_END;
} }
if (parsedItem.type !== DEFAULT_STATE_TYPE) { if (parsedItem.type !== DEFAULT_STATE_TYPE) {