Skip to content

Commit

Permalink
Add null check when rendering metadata in hits table
Browse files Browse the repository at this point in the history
Hopefully fix null error encountered by @eduarddrenth
  • Loading branch information
KCMertens committed May 23, 2023
1 parent 6e0d75b commit 9091082
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/frontend/src/pages/search/results/table/HitResults.vue
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
<td><span :dir="textDirection">{{rowData.right}}</span>&hellip;</td>
</template>
<td v-for="(v, index) in rowData.other" :key="index">{{v}}</td>
<td v-for="meta in shownMetadataCols" :key="meta.id">{{rowData.doc[meta.id].join(', ')}}</td>
<td v-for="meta in shownMetadataCols" :key="meta.id">{{rowData.doc[meta.id] ? rowData.doc[meta.id].join(', ') : ''}}</td>
</tr>
<tr v-if="citations[index]" v-show="citations[index].open" :key="index + '-citation'" :class="['concordance-details', {'open': citations[index].open}]">
<td :colspan="numColumns">
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/src/types/blacklabtypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ export interface BLTermOccurances {
};
}

/** Contains all metadata for a document */
/** Contains all metadata for a document. Fields without indexed values are omitted! */
export type BLDocInfo = {
lengthInTokens: number;
mayView: boolean;
Expand Down

0 comments on commit 9091082

Please sign in to comment.