mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-27 03:54:24 +01:00
Return if there was parsing error
This commit is contained in:
@@ -41,7 +41,9 @@ export function toggleComment() {
|
||||
}
|
||||
|
||||
let rootNode = parseContent(new DocumentStreamReader(editor.document));
|
||||
|
||||
if (!rootNode) {
|
||||
return;
|
||||
}
|
||||
editor.edit(editBuilder => {
|
||||
editor.selections.reverse().forEach(selection => {
|
||||
let [rangesToUnComment, rangeToComment] = toggleCommentInternal(editor.document, selection, rootNode);
|
||||
|
||||
Reference in New Issue
Block a user