Skip to content

Commit 3b2f99b

Browse files
fix(overmind-devtools-client): fix eval payload
1 parent 98bc733 commit 3b2f99b

File tree

1 file changed

+4
-2
lines changed
  • packages/node_modules/overmind-devtools-client/src/overmind

1 file changed

+4
-2
lines changed

packages/node_modules/overmind-devtools-client/src/overmind/actions.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,8 @@ export const executeAction: Operator = pipe(
181181

182182
effects.connector.sendMessage(state.currentApp.name, 'executeAction', {
183183
name: state.currentApp.selectedActionQuery,
184-
payload: state.currentApp.actionQueryPayload,
184+
// eslint-disable-next-line
185+
payload: JSON.stringify(eval(`(function () { return ${state.currentApp.actionQueryPayload} })()`)),
185186
})
186187
}),
187188
wait(500),
@@ -213,7 +214,8 @@ export const submitState: Action<string> = ({ state, effects }, newState) => {
213214

214215
effects.connector.sendMessage(state.currentApp.name, 'mutation', {
215216
path,
216-
value: newState,
217+
// eslint-disable-next-line
218+
value: JSON.stringify(eval(`(function () { return ${newState} })()`)),
217219
})
218220

219221
state.currentApp.selectedStatePath = null

0 commit comments

Comments
 (0)