diff --git a/es/debugStore/index.js b/es/debugStore/index.js index 0e542349..be915cf7 100644 --- a/es/debugStore/index.js +++ b/es/debugStore/index.js @@ -42,7 +42,7 @@ async function execWatcher(store, watcher, context) { const data = typeof actionData === 'function' ? await actionData() : actionData; // 这里有个奇怪的编译错误,不理解 by Xc const result = await store.operate(entity, { id: await generateNewIdAsync(), - action, + action: action, data, filter: filter2 }, context, { diff --git a/es/features/subscriber.js b/es/features/subscriber.js index d5149921..035dd809 100644 --- a/es/features/subscriber.js +++ b/es/features/subscriber.js @@ -179,10 +179,4 @@ export class SubScriber extends Feature { return this.socket.id; } } - - closeSocket() { - if (this.socket) { - this.socket.close(); - } - } } diff --git a/lib/debugStore/index.js b/lib/debugStore/index.js index 4f6598ab..976dbe7c 100644 --- a/lib/debugStore/index.js +++ b/lib/debugStore/index.js @@ -45,7 +45,7 @@ async function execWatcher(store, watcher, context) { const data = typeof actionData === 'function' ? await actionData() : actionData; // 这里有个奇怪的编译错误,不理解 by Xc const result = await store.operate(entity, { id: await (0, uuid_1.generateNewIdAsync)(), - action, + action: action, data, filter: filter2 }, context, { diff --git a/lib/features/subscriber.js b/lib/features/subscriber.js index ba25a6da..fdf2f87f 100644 --- a/lib/features/subscriber.js +++ b/lib/features/subscriber.js @@ -137,6 +137,9 @@ class SubScriber extends Feature_1.Feature { if (this.socketState === 'unconnected') { return this.connect(); } + else if (this.socketState === 'connecting') { + return this.connect(); + } else if (this.socketState === 'connected' && newEvents.length > 0) { return new Promise((resolve, reject) => { this.socket.emit('sub', newEvents, (result) => { diff --git a/src/debugStore/index.ts b/src/debugStore/index.ts index 56a6bfb9..ad96aaad 100644 --- a/src/debugStore/index.ts +++ b/src/debugStore/index.ts @@ -70,7 +70,7 @@ async function execWatcher