Skip to content

Commit fbf9e4a

Browse files
author
Martii
committed
Don't return the callbacks
Applies to #296 **NOTE**: This doesn't appear to make a huge difference either way but symmetrical with null callback syntax with the implied return
1 parent 5c9f39b commit fbf9e4a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

controllers/document.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ exports.view = function (aReq, aRes, aNext) {
3434
// Read file listing
3535
function (aCallback) {
3636
fs.readdir(documentPath, function (aErr, aFiles) {
37-
if (aErr) { return aCallback('Error retrieving page list'); }
37+
if (aErr) { aCallback('Error retrieving page list'); return; }
3838

3939
var file = null;
4040

@@ -56,7 +56,7 @@ exports.view = function (aReq, aRes, aNext) {
5656
// Read md file contents
5757
function (aCallback) {
5858
fs.readFile(documentPath + '/' + document + '.md', 'UTF8', function (aErr, aData) {
59-
if (aErr) { return aCallback('Error retrieving page'); }
59+
if (aErr) { aCallback('Error retrieving page'); return; }
6060

6161
var lines = null;
6262
var matches = null;

0 commit comments

Comments
 (0)