Skip to content

Commit

Permalink
グラフ表示時に言語環境のラベルがない場合にenを使用するように
Browse files Browse the repository at this point in the history
  • Loading branch information
sasaujp committed Feb 10, 2021
1 parent 6dd3c2f commit b6cb2c5
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions node/src/ts/visualizer/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@ export const getPreferredLabel = (
locale: string
): string => {
const detail = classes[uri]
const label = detail?.label ? detail.label[locale] || detail.label[''] : null

const labels = detail?.label
if (!labels) {
return uri
}
const label = labels[locale] || labels.en || labels[''] || null
return label || uri
}

Expand Down

0 comments on commit b6cb2c5

Please sign in to comment.