From e9606ca1bcb600c354ebaff23e62bf1fff8f67fa Mon Sep 17 00:00:00 2001 From: "davidzagi93@gmail.com" Date: Tue, 17 Aug 2021 14:42:34 +0100 Subject: [PATCH] fix: fixed load gist error --- libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx b/libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx index 5644c329b1..86428a1a00 100644 --- a/libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx +++ b/libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx @@ -170,7 +170,6 @@ export const RemixUiTerminal = (props: RemixUiTerminalProps) => { } function loadgist (id, cb) { - console.log('load gist') props.gistHandler.loadFromGist({ gist: id }, props._deps.fileManager) if (cb) cb() } @@ -182,7 +181,7 @@ export const RemixUiTerminal = (props: RemixUiTerminalProps) => { if (script.indexOf('remix.') === 0) { // we keep the old feature. This will basically only be called when the command is querying the "remix" object. // for all the other case, we use the Code Executor plugin - const context = { remix: { exeCurrent: () => { return execute(undefined, undefined) }, loadgist: () => { return loadgist(script, () => {}) } } } + const context = { remix: { exeCurrent: () => { return execute(undefined, undefined) }, loadgist: (id: any) => { return loadgist(id, () => {}) } } } try { const cmds = vm.createContext(context) const result = vm.runInContext(script, cmds)