Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
vmonakhov committed Oct 22, 2024
1 parent 8aa74cb commit e98e0e4
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/components/CognateAnalysisModal/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2260,10 +2260,10 @@ class CognateAnalysisModal extends React.Component {
const { fileSuite, debugFlag } = this.state;
const resultPool = new Array(fileSuite.length);

for (const [index, file] of fileSuite.entries()) {
const reader = new FileReader();
reader.onload = () => {
try {
try {
for (const [index, file] of fileSuite.entries()) {
const reader = new FileReader();
reader.onload = () => {
resultPool[index] = JSON.parse(reader.result);

if ((index + 1) == fileSuite.length) {
Expand All @@ -2277,11 +2277,11 @@ class CognateAnalysisModal extends React.Component {
error_data => this.handleError(error_data)
);
}
} catch(error_data) {
this.handleError(error_data)
}
};
reader.readAsText(file);
};
reader.readAsText(file);
}
} catch(error_data) {
this.handleError(error_data);
}
} else {
/* Otherwise we will launch it as usual and then will wait for results to display them. */
Expand Down

0 comments on commit e98e0e4

Please sign in to comment.