From 7797d2126240c75230b2cdcc57f8a9e9ccc8c766 Mon Sep 17 00:00:00 2001 From: yann300 Date: Wed, 3 Jan 2018 18:15:36 +0100 Subject: [PATCH] keep context for next runs --- src/app/panels/terminal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/panels/terminal.js b/src/app/panels/terminal.js index a37a1277ed..9286df9690 100644 --- a/src/app/panels/terminal.js +++ b/src/app/panels/terminal.js @@ -687,7 +687,7 @@ class Terminal { try { var cmds = vm.createContext(Object.assign(self._jsSandboxContext, context)) var result = vm.runInContext(script, cmds) - self._jsSandboxContext = Object.assign({}, context) + self._jsSandboxContext = Object.assign(cmds, context) done(null, result) } catch (error) { done(error.message)