Skip to content

Commit e98e0e4

Browse files
committed
minor
1 parent 8aa74cb commit e98e0e4

File tree

1 file changed

+9
-9
lines changed
  • src/components/CognateAnalysisModal

1 file changed

+9
-9
lines changed

src/components/CognateAnalysisModal/index.js

+9-9
Original file line numberDiff line numberDiff line change
@@ -2260,10 +2260,10 @@ class CognateAnalysisModal extends React.Component {
22602260
const { fileSuite, debugFlag } = this.state;
22612261
const resultPool = new Array(fileSuite.length);
22622262

2263-
for (const [index, file] of fileSuite.entries()) {
2264-
const reader = new FileReader();
2265-
reader.onload = () => {
2266-
try {
2263+
try {
2264+
for (const [index, file] of fileSuite.entries()) {
2265+
const reader = new FileReader();
2266+
reader.onload = () => {
22672267
resultPool[index] = JSON.parse(reader.result);
22682268

22692269
if ((index + 1) == fileSuite.length) {
@@ -2277,11 +2277,11 @@ class CognateAnalysisModal extends React.Component {
22772277
error_data => this.handleError(error_data)
22782278
);
22792279
}
2280-
} catch(error_data) {
2281-
this.handleError(error_data)
2282-
}
2283-
};
2284-
reader.readAsText(file);
2280+
};
2281+
reader.readAsText(file);
2282+
}
2283+
} catch(error_data) {
2284+
this.handleError(error_data);
22852285
}
22862286
} else {
22872287
/* Otherwise we will launch it as usual and then will wait for results to display them. */

0 commit comments

Comments
 (0)