Skip to content

Commit cdca63d

Browse files
committed
chore: Simplify dataFetcher helper functions
1 parent b79191e commit cdca63d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/mermaid/src/diagrams/state/dataFetcher.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -198,10 +198,10 @@ export const dataFetcher = (
198198

199199
if (itemId !== 'root') {
200200
let shape = SHAPE_STATE;
201+
// The if === true / false can be removed if we can guarantee that the parsedItem.start is always a boolean
201202
if (parsedItem.start === true) {
202203
shape = SHAPE_START;
203-
}
204-
if (parsedItem.start === false) {
204+
} else if (parsedItem.start === false) {
205205
shape = SHAPE_END;
206206
}
207207
if (parsedItem.type !== DEFAULT_STATE_TYPE) {

0 commit comments

Comments
 (0)