Skip to content

Commit

Permalink
fix(admin-ui): Correctly display primitive value job queue results
Browse files Browse the repository at this point in the history
Fixes #881
  • Loading branch information
michaelbromley committed Nov 8, 2021
1 parent 00ac70d commit d8c2195
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
>
<li *ngFor="let entry of entries">
<span class="key" *ngIf="entry.key">{{ entry.key }}:</span>
<ng-container *ngIf="isObject(entry.value)">
<ng-container *ngIf="isObject(entry.value); else primitive">
<vdr-object-tree [value]="entry.value" [isArrayItem]="valueIsArray"></vdr-object-tree>
</ng-container>
<ng-container *ngIf="!isObject(entry.value)">
<ng-template #primitive>
{{ entry.value }}
</ng-container>
</ng-template>
</li>
</ul>
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export class ObjectTreeComponent implements OnInit {
}

private getEntries(inputValue: { [key: string]: any } | string): Array<{ key: string; value: any }> {
if (typeof inputValue === 'string') {
if (!this.isObject(inputValue)) {
return [{ key: '', value: inputValue }];
}
return Object.entries(inputValue).map(([key, value]) => ({ key, value }));
Expand Down

0 comments on commit d8c2195

Please sign in to comment.