Skip to content

Commit

Permalink
Fix hook function return
Browse files Browse the repository at this point in the history
Hook functions must either return a non-undefined value or call the
callback, and they must not do both.
  • Loading branch information
rhansen committed Oct 12, 2020
1 parent 0e92cb4 commit 439c25d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ exports.expressCreateServer = (hook_name, args, cb) => {

let io = null;

exports.socketio = (hook_name, args) => {
exports.socketio = (hookName, args, cb) => {
io = args.io.of('/pluginfw/admin/pads');
io.on('connection', (socket) => {
const _search = async (query) => {
Expand All @@ -90,6 +90,7 @@ exports.socketio = (hook_name, args) => {
}
});
});
return cb();
};

const updatePads = (hookName, args, cb) => {
Expand Down

0 comments on commit 439c25d

Please sign in to comment.