Skip to content

Commit

Permalink
getting language id
Browse files Browse the repository at this point in the history
  • Loading branch information
vmonakhov committed Sep 29, 2024
1 parent 63b4522 commit 0186f93
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/components/CognateAnalysisModal/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2122,11 +2122,12 @@ class CognateAnalysisModal extends React.Component {
for (const language of this.state.language_list) {
let p_count = 0;

for (const { perspective } of language.perspective_list) {
for (const { perspective, treePathList: [language,,] } of language.perspective_list) {
const p_key = id2str(perspective.id);

if (this.state.perspectiveSelectionMap[p_key]) {
perspectiveInfoList.push([
language.id,
perspective.id,
this.fieldDict[this.state.transcriptionFieldIdStrMap[p_key]].id,
this.fieldDict[this.state.translationFieldIdStrMap[p_key]].id,
Expand All @@ -2142,7 +2143,8 @@ class CognateAnalysisModal extends React.Component {
} else {
perspectiveInfoList = this.perspective_list

.map(({ perspective }, index) => [
.map(({ perspective, treePathList: [language,,] }, index) => [
language.id,
perspective.id,
this.fieldDict[this.state.transcriptionFieldIdStrList[index]].id,
this.fieldDict[this.state.translationFieldIdStrList[index]].id,
Expand Down
1 change: 1 addition & 0 deletions src/pages/DistanceMap/getDistancePerspectives.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ const getDistance = async (dictionaries, allField, mainDictionary, computeDistan

const perspectiveInfoList = perspectiveList
.map(({ perspective }, index) => [
null,
perspective.id,
fieldDict[transcriptionFieldIdStrList[index]].id,
fieldDict[translationFieldIdStrList[index]].id,
Expand Down

0 comments on commit 0186f93

Please sign in to comment.