mirror of
https://github.com/cool-team-official/cool-admin-midway-packages.git
synced 2025-12-11 13:52:50 +00:00
优化消息判断
This commit is contained in:
parent
5c17142969
commit
61a25cc214
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@cool-midway/core",
|
||||
"version": "7.1.12",
|
||||
"version": "7.1.13",
|
||||
"description": "",
|
||||
"main": "dist/index.js",
|
||||
"typings": "index.d.ts",
|
||||
|
||||
@ -154,7 +154,8 @@ export class CoolEventManager extends Events {
|
||||
*/
|
||||
async globalEvent() {
|
||||
process.on("message", async (message: any) => {
|
||||
const data = message.data;
|
||||
const data = message?.data;
|
||||
if (!data) return;
|
||||
if (data.type != `${COOL_EVENT_MESSAGE}@${this.keys}`) return;
|
||||
await this.doAction(message);
|
||||
});
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@cool-midway/core",
|
||||
"version": "7.1.12",
|
||||
"version": "7.1.13",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"typings": "index.d.ts",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user