This commit is contained in:
Dmitry Vasilev
2023-10-02 03:20:10 +03:00
parent 7606419bb9
commit 7847c9e879
2 changed files with 2 additions and 2 deletions

2
src/effects.js vendored
View File

@@ -139,7 +139,7 @@ export const render_initial_state = (ui, state, example) => {
}
}
export const apply_side_effects = (prev, next, command, ui) => {
export const apply_side_effects = (prev, next, ui) => {
if(prev.project_dir != next.project_dir) {
ui.files.render(next)
}

View File

@@ -307,7 +307,7 @@ export const exec = (cmd, ...args) => {
// Wrap with_code_execution, because rendering values can trigger execution
// of code by toString() and toJSON() methods
with_code_execution(() => {
apply_side_effects(state, nextstate, cmd, ui);
apply_side_effects(state, nextstate, ui)
if(effects != null) {
(Array.isArray(effects) ? effects : [effects]).forEach(e => {