Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
vmonakhov committed Feb 17, 2025
1 parent 7ed1f19 commit bc0b83a
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/components/CognateAnalysisModal/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1440,11 +1440,16 @@ class CognateAnalysisModal extends React.Component {

componentDidMount() {

if (this.props.mode === "complex_distance" || this.props.mode === "view_suggestions") {
if (this.props.mode === "complex_distance") {
this.setState({ lang_mode: "none", initialized: true });
return;
}

if (this.props.mode === "view_suggestions") {
this.getResultData();
return;
}

const multi =
this.props.mode === "multi_analysis" ||
this.props.mode === "multi_reconstruction" ||
Expand Down Expand Up @@ -3129,7 +3134,8 @@ class CognateAnalysisModal extends React.Component {
transcription_count,
dictionary_count: perspective_name_list.length,
...this.handleSuggestionResult({ suggestion_list }),
result: ""
result: "",
initialized: true
});
}

Expand All @@ -3142,13 +3148,9 @@ class CognateAnalysisModal extends React.Component {
);
}

const { mode, resultFile } = this.props;
const { mode } = this.props;
const viewMode = (mode === "view_suggestions");

if (viewMode && resultFile) {
this.getResultData();
}

const {
computing,
language_list,
Expand Down

0 comments on commit bc0b83a

Please sign in to comment.