mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 21:09:43 +00:00
Fix empty jsdoc suggest template not properyly expanding to multiline
Fixes #43619
This commit is contained in:
parent
d17652218a
commit
57e5420127
|
@ -170,6 +170,12 @@ class TryCompleteJsDocCommand implements Command {
|
|||
if (!res || !res.body) {
|
||||
return undefined;
|
||||
}
|
||||
// Workaround for #43619
|
||||
// docCommentTemplate previously returned undefined for empty jsdoc templates.
|
||||
// TS 2.7 now returns a single line doc comment, which breaks indentation.
|
||||
if (res.body.newText === '/** */') {
|
||||
return undefined;
|
||||
}
|
||||
return TryCompleteJsDocCommand.templateToSnippet(res.body.newText);
|
||||
}, () => undefined);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue