value explorer improvements

This commit is contained in:
Dmitry Vasilev
2023-06-09 16:59:21 +03:00
parent 583e34f71a
commit fb9a4c83b8
2 changed files with 73 additions and 4 deletions

View File

@@ -210,6 +210,15 @@ export const exec = (cmd, ...args) => {
throw new Error('illegal state')
}
/*
supress is_recording_deferred_calls while rendering, because rendering may
call toJSON(), which can call trigger deferred call (see lodash.js lazy
chaining)
*/
if(nextstate.eval_cxt != null) {
nextstate.eval_cxt.is_recording_deferred_calls = false
}
render_common_side_effects(state, nextstate, cmd, ui);
if(effects != null) {
@@ -224,6 +233,11 @@ export const exec = (cmd, ...args) => {
})
}
if(nextstate.eval_cxt != null) {
nextstate.eval_cxt.is_recording_deferred_calls = true
}
// Expose for debugging
globalThis.__prev_state = state
globalThis.__state = nextstate