Fix 'Unhandled RPC' log with isNewChannel

This commit is contained in:
yflory 2023-09-13 14:48:16 +02:00
parent d9741d53dc
commit f69dcbdda9

View file

@ -254,7 +254,8 @@ var ARRAY_LINE = /^\[/;
call back with true if the channel log has no content other than metadata
otherwise false
*/
Channel.isNewChannel = function (Env, channel, cb) {
Channel.isNewChannel = function (Env, channel, _cb) {
var cb = Util.once(_cb);
if (!Core.isValidId(channel)) { return void cb('INVALID_CHAN'); }
if (channel.length !== HK.STANDARD_CHANNEL_LENGTH &&
channel.length !== HK.ADMIN_CHANNEL_LENGTH) { return void cb('INVALID_CHAN'); }