Skip to content

Commit

Permalink
Merge pull request #193 from slightlyoff/master
Browse files Browse the repository at this point in the history
Fixes file saving in `formatData`.
  • Loading branch information
claud-io authored Jul 24, 2024
2 parents 02e3bf8 + c8accde commit 8e0dfc1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/webpagetest
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ var formatData = function(err, data, info) {
}

if (file) {
fs.writeFile(file, dataStr, encoding, function writeFile(err) {
fs.writeFile(file, (dataStr || data), encoding, function writeFile(err) {
if (err) {
output(err.message, 1);
}
});
} else {
output(dataStr, err ? 1 : 0);
output((dataStr || data), err ? 1 : 0);
}

return data;
Expand Down

0 comments on commit 8e0dfc1

Please sign in to comment.