Skip to content

Commit 869cd93

Browse files
committed
fix: Display scalar array as array inside union
1 parent 227e582 commit 869cd93

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

src/ApiTypeDocument.js

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -502,17 +502,7 @@ export class ApiTypeDocument extends PropertyDocumentMixin(LitElement) {
502502
[item] = item;
503503
}
504504
if (this._hasType(item, this.ns.aml.vocabularies.shapes.ArrayShape)) {
505-
item = this._resolve(item);
506-
const itemsKey = this._getAmfKey(this.ns.aml.vocabularies.shapes.items);
507-
const items = this._ensureArray(item[itemsKey]);
508-
if (items && items.length === 1) {
509-
let result = items[0];
510-
if (Array.isArray(result)) {
511-
[result] = result;
512-
}
513-
result = this._resolve(result);
514-
return result;
515-
}
505+
return this._resolve(item);
516506
}
517507
if (Array.isArray(item)) {
518508
[item] = item;

0 commit comments

Comments
 (0)