Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
1821cc46
Commit
1821cc46
authored
Aug 17, 2021
by
davidzagi93@gmail.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: fixed load gist error
parent
b5166094
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
remix-ui-terminal.tsx
libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx
+1
-2
No files found.
libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx
View file @
1821cc46
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment