fix: return an empty funtion in loadgist

pull/1342/head
davidzagi93@gmail.com 3 years ago
parent b7bfc44830
commit e4d5db2f7e
  1. 2
      libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx

@ -182,7 +182,7 @@ export const RemixUiTerminal = (props: RemixUiTerminalProps) => {
if (script.indexOf('remix.') === 0) { if (script.indexOf('remix.') === 0) {
// we keep the old feature. This will basically only be called when the command is querying the "remix" object. // 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 // for all the other case, we use the Code Executor plugin
const context = { remix: { exeCurrent: () => { return execute(undefined, undefined) }, loadgist: () => { return loadgist(script, undefined) } } } const context = { remix: { exeCurrent: () => { return execute(undefined, undefined) }, loadgist: () => { return loadgist(script, () => {}) } } }
try { try {
const cmds = vm.createContext(context) const cmds = vm.createContext(context)
const result = vm.runInContext(script, cmds) const result = vm.runInContext(script, cmds)

Loading…
Cancel
Save