Skip to content

Commit 50455eb

Browse files
committed
Pass required third argument to writefile in solution 21.1
Issue marijnh#478
1 parent bffb9db commit 50455eb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

code/solutions/21_1_disk_persistence.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ SkillShareServer.prototype.updated = function() {
2121
this.waiting.forEach(resolve => resolve(response));
2222
this.waiting = [];
2323

24-
writeFile(fileName, JSON.stringify(this.talks));
24+
writeFile(fileName, JSON.stringify(this.talks), e => {
25+
if (e) throw e;
26+
});
2527
};
2628

2729
// The line that starts the server must be changed to

0 commit comments

Comments
 (0)