Skip to content

Commit

Permalink
chore: Simplify dataFetcher helper functions
Browse files Browse the repository at this point in the history
  • Loading branch information
sidharthv96 committed Jul 27, 2024
1 parent b79191e commit cdca63d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/mermaid/src/diagrams/state/dataFetcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,10 +198,10 @@ export const dataFetcher = (

if (itemId !== 'root') {
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) {
shape = SHAPE_START;
}
if (parsedItem.start === false) {
} else if (parsedItem.start === false) {
shape = SHAPE_END;
}
if (parsedItem.type !== DEFAULT_STATE_TYPE) {
Expand Down

0 comments on commit cdca63d

Please sign in to comment.