Skip to content

Commit 4aeb54a

Browse files
authored
Merge pull request #60 from CodinGame/fix-autosave-non-file-models
[FIX] Do not try to save non-file models
2 parents ce1dc9f + 1904635 commit 4aeb54a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/services/CodinGameMonacoWorkspace.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@ export default class CodinGameMonacoWorkspace implements Workspace {
9191
const disposableCollection = new DisposableCollection()
9292
const timeoutMap = new Map<string, number>()
9393
disposableCollection.push(vscode.workspace.onDidChangeTextDocument(e => {
94+
if (e.document.uri.scheme !== 'file') {
95+
// Ignore non-file models
96+
return
97+
}
9498
const uri = e.document.uri.toString()
9599
const timeout = timeoutMap.get(uri)
96100
if (timeout != null) {

0 commit comments

Comments
 (0)