Skip to content
This repository was archived by the owner on Apr 8, 2025. It is now read-only.

Commit 439c25d

Browse files
committed
Fix hook function return
Hook functions must either return a non-undefined value or call the callback, and they must not do both.
1 parent 0e92cb4 commit 439c25d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ exports.expressCreateServer = (hook_name, args, cb) => {
6666

6767
let io = null;
6868

69-
exports.socketio = (hook_name, args) => {
69+
exports.socketio = (hookName, args, cb) => {
7070
io = args.io.of('/pluginfw/admin/pads');
7171
io.on('connection', (socket) => {
7272
const _search = async (query) => {
@@ -90,6 +90,7 @@ exports.socketio = (hook_name, args) => {
9090
}
9191
});
9292
});
93+
return cb();
9394
};
9495

9596
const updatePads = (hookName, args, cb) => {

0 commit comments

Comments
 (0)