always display initial goal

This commit is contained in:
Alexander Bentkamp
2022-12-01 17:24:44 +01:00
parent 0273d6a465
commit 75c37bc8b7
3 changed files with 15 additions and 8 deletions
+1 -1
View File
@@ -36,13 +36,13 @@ function Infoview({ editor, editorApi, leanClient } : {editor: monaco.editor.ISt
useEffect(() => {
if (editor) {
fetchInteractiveGoals()
const t = editor.onDidChangeModel((ev) => {
if (ev.newModelUrl) {
setRpcSession(undefined)
setUri(ev.newModelUrl.toString())
editorApi.createRpcSession(ev.newModelUrl.toString()).then((rpcSession) => {
setRpcSession(rpcSession)
fetchInteractiveGoals()
})
}
})