From 38858337640a78f263d0592f5875495dee8f7ab7 Mon Sep 17 00:00:00 2001 From: Matthew Enderle Date: Wed, 30 Nov 2022 23:11:42 -0600 Subject: [PATCH] fix: socketio spawn error (#19070) * fix: socketio spawn error Restarting supervisorctl fails when attempting to spawn the instance due to syntax. * refactor: accurate expansion of optional chaining Co-authored-by: Ankush Menat --- socketio.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/socketio.js b/socketio.js index 242100baae..250f3744d1 100644 --- a/socketio.js +++ b/socketio.js @@ -303,7 +303,7 @@ function can_subscribe_list(args) { } return false; } else if (res.status == 200) { - args?.callback(err, res); + args.callback && args.callback(err, res); return true; } log("ERROR (can_subscribe_list): ", err, res);