mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 23:13:02 +01:00
Handle the case that tag.text is a string
This commit is contained in:
parent
b8e0740b41
commit
a03a8ba908
1 changed files with 3 additions and 1 deletions
|
|
@ -575,8 +575,10 @@ function tagToString(tag: ts.JSDocTagInfo): string {
|
|||
const [paramName, ...rest] = tag.text;
|
||||
tagLabel += `\`${paramName.text}\``;
|
||||
if (rest.length > 0) tagLabel += ` — ${rest.map(r => r.text).join(' ')}`;
|
||||
} else if (tag.text) {
|
||||
} else if (Array.isArray(tag.text)) {
|
||||
tagLabel += ` — ${tag.text.map(r => r.text).join(' ')}`;
|
||||
} else if (tag.text) {
|
||||
tagLabel += ` — ${tag.text}`;
|
||||
}
|
||||
return tagLabel;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue