diff --git a/src/ApiTypeDocument.js b/src/ApiTypeDocument.js index 19acae4..24b6955 100644 --- a/src/ApiTypeDocument.js +++ b/src/ApiTypeDocument.js @@ -655,57 +655,48 @@ export class ApiTypeDocument extends PropertyDocumentMixin(LitElement) { /** * @return {TemplateResult} Templates for object properties */ - _arrayTemplate() { + _arrayTemplate() { const items = this._computeArrayProperties(this._resolvedType) || []; - return html` - ${this.hasParentType - ? html`` - : html`Array of:`} - -
- ${items.map( - (item) => html` - ${item.isShape - ? html`` - : ''} - ${item.isType - ? html`` - : ''} - ` - )} -
- `; + const documents = items.map( + (item) => html` + ${item.isShape + ? html`` + : ''} + ${item.isType + ? html`` + : ''} + ` + ); + if (!this.hasParentType) { + return html` + Array of: +
+ ${documents} +
+ `; + } + return html`${documents}`; } /**