mirror of
https://github.com/danbulant/discord.js
synced 2026-05-27 14:02:02 +00:00
cleanup(DataResolver): stats can't be falsy (#3651)
This commit is contained in:
parent
6af0da1043
commit
d2ef02906c
1 changed files with 1 additions and 1 deletions
|
|
@ -96,7 +96,7 @@ class DataResolver {
|
|||
const file = browser ? resource : path.resolve(resource);
|
||||
fs.stat(file, (err, stats) => {
|
||||
if (err) return reject(err);
|
||||
if (!stats || !stats.isFile()) return reject(new DiscordError('FILE_NOT_FOUND', file));
|
||||
if (!stats.isFile()) return reject(new DiscordError('FILE_NOT_FOUND', file));
|
||||
fs.readFile(file, (err2, data) => {
|
||||
if (err2) reject(err2);
|
||||
else resolve(data);
|
||||
|
|
|
|||
Loading…
Reference in a new issue