mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 16:43:31 +01:00
Make file resolving non-blocking for local paths
This commit is contained in:
@@ -195,7 +195,12 @@ class ClientDataResolver {
|
||||
return reject(new Error(`The file could not be found: ${file}`));
|
||||
}
|
||||
|
||||
return resolve(fs.readFileSync(file));
|
||||
fs.readFile(file, (err, data) => {
|
||||
if (err) {
|
||||
return reject(err);
|
||||
}
|
||||
resolve(data);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user