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