Code optimization

This commit is contained in:
Vladislav Hristov committed 2018-06-28 11:34:14 +03:00
1 parent 9660242234
commit b259ac76d6
2 files changed
+11 -17

No files matched your search

+1 -1
View File
@@ -9,7 +9,7 @@ module.exports = (pathToFile) => {
write(data) {
return new Promise((resolve, reject) => {
fs.writeFile(path, data, { encoding: 'utf8' }, (error) => {
if (error) throw error;
if (error) reject(error);
return resolve();
});