Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0d5f47b

Browse files
committed
prevent loading multiple CR instances
1 parent9a452d6 commit0d5f47b

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

‎src/editor/commands/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ let webview: any
3535
exportconstcreateCommands=({ context, machine, storage, git, position}:CreateCommandProps)=>({
3636
// initialize
3737
[COMMANDS.START]:()=>{
38+
if(webview){
39+
console.log('CodeRoad already loaded')
40+
return
41+
}
3842
// set local storage workspace
3943
setStorage(context.workspaceState)
4044

‎web-app/src/App.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ const App = () => {
1414
const[state,setState]=React.useState(initialState)
1515
const[data,setData]:[CR.MachineContext,(data:CR.MachineContext)=>void]=React.useState(initialData)
1616

17+
// update state based on response from editor
1718
consthandleEvent=(event:ReceivedEvent):void=>{
1819
constmessage=event.data
1920
console.log('RECEIVED')

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp