Skip to content

Commit 7a5d315

Browse files
committed
fix: do not show discriminator dropdown if it is empty
1 parent 131b437 commit 7a5d315

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/components/JsonSchema/json-schema.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
<span *ngIf="prop.pattern" class="param-pattern">{{prop.pattern}}</span>
8484
</div>
8585
<div class="param-description" [innerHtml]="prop.description | marked"></div>
86-
<div class="discriminator-info" *ngIf="prop.isDiscriminator">
86+
<div class="discriminator-info" *ngIf="prop.isDiscriminator && descendants.length">
8787
<drop-down (change)="selectDescendantByIdx($event)" [active]="activeDescendant.idx">
8888
<option *ngFor="let descendant of descendants; let i=index"
8989
[value]="i" [attr.selected]="descendant.active ? '' : null" >{{descendant.name}}</option>

0 commit comments

Comments
 (0)