Fixed a silly error i made

This commit is contained in:
Pierce 2019-07-21 09:09:18 -04:00
parent 1f1f4c847f
commit 45f3c95da1
2 changed files with 4 additions and 3 deletions

View file

@ -19,8 +19,8 @@ class Handler {
const _request = request(url, {timeout: this.options.timeout || 10000});
_request.on('error', function(error) {
this.client.emit('debug', `[MCLC]: Failed to download asset to ${path.join(directory, name)} due to\n${e}`);
_request.on('error', (error) => {
this.client.emit('debug', `[MCLC]: Failed to download asset to ${path.join(directory, name)} due to\n${error}`);
resolve({
failed: true,
asset: {
@ -136,6 +136,7 @@ class Handler {
// why do we have this? B/c sometimes Minecraft's resource site times out!
if(failed) {
this.client.emit('debug', '[MCLC]: Attempting to download failed assets');
await Promise.all(failed.map(async asset => await this.downloadAsync(asset.url, asset.directory, asset.name)))
}

View file

@ -1,6 +1,6 @@
{
"name": "minecraft-launcher-core",
"version": "3.6.1",
"version": "3.6.2",
"description": "Lightweight module that downloads and runs Minecraft using javascript / NodeJS",
"main": "index.js",
"dependencies": {