Wait for document to be saved before running query
This prevents a race condition where the query runs before the editor has saved the file.
This commit is contained in:
committed by
Shati Patel
parent
6d41362251
commit
4f568ea331
@@ -524,7 +524,7 @@ export async function determineSelectedQuery(selectedResourceUri: Uri | undefine
|
||||
// then prompt the user to save it first.
|
||||
if (editor !== undefined && editor.document.uri.fsPath === queryPath) {
|
||||
if (await promptUserToSaveChanges(editor.document)) {
|
||||
void editor.document.save();
|
||||
await editor.document.save();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user