diff --git a/src/effects.js b/src/effects.js index 623d3c0..eabf639 100644 --- a/src/effects.js +++ b/src/effects.js @@ -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) } diff --git a/src/index.js b/src/index.js index 39fcec2..94f298e 100644 --- a/src/index.js +++ b/src/index.js @@ -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 => {