mirror of
https://github.com/leporello-js/leporello-js
synced 2026-01-13 21:14:28 -08:00
value explorer improvements
This commit is contained in:
14
src/index.js
14
src/index.js
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user