diff --git a/src/interfaces/utils.ts b/src/interfaces/utils.ts index b473366d..cbd1b00b 100644 --- a/src/interfaces/utils.ts +++ b/src/interfaces/utils.ts @@ -571,6 +571,8 @@ export async function PayloadSendNoti(commandId: string) { }, relations: ["commandType"], }); + if (!_command || !_command.commandType) + return ""; const _payload = { name: _command && _command.commandType ? `คำสั่ง${_command.commandType.name}`