Skip to content

Commit

Permalink
Fixed deprecation warning [DEP0013] that throws type error in Node ve…
Browse files Browse the repository at this point in the history
…rsion 10+
  • Loading branch information
R4mpancy committed Nov 8, 2018
1 parent 1c10834 commit 021b813
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bin/tith.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ function createTiAppFile(fromPath) {

function copyFile(fromPath, toPath) {
fs.readFile(fromPath, function (err, data) {
fs.writeFile(toPath, data);
fs.writeFile(toPath, data, (err) => {
if(err) throw err;
});
});
}

Expand Down

0 comments on commit 021b813

Please sign in to comment.