mirror of
https://github.com/artegoser/pimi-launcher-core.git
synced 2024-12-23 10:23:47 +03:00
Fixed a silly error i made
This commit is contained in:
parent
1f1f4c847f
commit
45f3c95da1
2 changed files with 4 additions and 3 deletions
|
@ -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)))
|
||||
}
|
||||
|
||||
|
|
|
@ -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": {
|
||||
|
|
Loading…
Add table
Reference in a new issue