Skip to content

Commit

Permalink
Fix issue for data downloader
Browse files Browse the repository at this point in the history
If a request fails, it will get stuck in an invalid state. This fixes the error.
  • Loading branch information
AgustinSRG committed Jan 14, 2024
1 parent 36a1df0 commit 11892f7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "showdown-chatbot",
"version": "2.10.0",
"version": "2.10.1",
"author": {
"name": "Agustin San Roman",
"email": "[email protected]",
Expand Down
1 change: 1 addition & 0 deletions src/data.js
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ class DataManager {
wget(Showdown_Data[this.cur].url, function (data, err) {
if (err) {
this.events.emit('msg', "Error: Failed to download " + Showdown_Data[this.cur].url + " | (" + err.code + ") " + err.messaage);
this.nextDownload();
return;
}
FileSystem.writeFile(Path.resolve(this.path, Showdown_Data[this.cur].file), data, function (err2) {
Expand Down

0 comments on commit 11892f7

Please sign in to comment.