Update deps and fix webpack

This commit is contained in:
Crawl
2017-07-16 14:34:23 +02:00
parent ed84d76a42
commit 26e5ef3205
9 changed files with 20 additions and 22 deletions

View File

@@ -212,11 +212,11 @@ class ClientDataResolver {
return new Promise((resolve, reject) => {
if (/^https?:\/\//.test(resource)) {
snekfetch.get(resource)
.end((err, res) => {
if (err) return reject(err);
if (!(res.body instanceof Buffer)) return reject(new TypeError('The response body isn\'t a Buffer.'));
return resolve(res.body);
});
.end((err, res) => {
if (err) return reject(err);
if (!(res.body instanceof Buffer)) return reject(new TypeError('The response body isn\'t a Buffer.'));
return resolve(res.body);
});
} else {
const file = path.resolve(resource);
fs.stat(file, (err, stats) => {