0201
Some checks failed
test / Run tests (push) Failing after 15s
build / Build (push) Failing after 22s

This commit is contained in:
2025-02-01 14:39:57 +08:00
parent 23b8efcdf5
commit 8ae6fcc8f9
2 changed files with 2 additions and 2 deletions

View File

@ -2,7 +2,8 @@ import { Message, MessageConnect } from "./server";
export async function sendMessage(msg: Message, action: string, data?: any): Promise<any> {
const res = await msg.sendMessage({ action, data });
if (res.code) {
console.log(action, data, res);
if (res && res.code) {
console.error(res);
return Promise.reject(res.message);
} else {