Skip to content

Commit 8604346

Browse files
committed
fix: remove empty object from init state
1 parent 4bd5439 commit 8604346

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

packages/flower-core/src/FlowerCoreStateFunctions.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,10 @@ export const FlowerCoreReducers: ReducersFunctions = {
199199
history,
200200
nodes: generateNodes(payload.nodes),
201201
nextRules: makeObjectRules(payload.nodes),
202-
data: Object.keys(payload.initialData).length === 0 ? (state.data ?? {}) : payload.initialData
202+
data:
203+
Object.keys(payload.initialData).length === 0
204+
? state.data ?? {}
205+
: payload.initialData
203206
})
204207
},
205208
// TODO usato solo da flower su vscode

0 commit comments

Comments
 (0)