处理filter时没处理异步
This commit is contained in:
parent
9b2ca17179
commit
5a868a3bb3
|
|
@ -40,7 +40,7 @@ function startWatchers(dbStore, path, contextBuilder) {
|
|||
try {
|
||||
if (w.hasOwnProperty('actionData')) {
|
||||
const { entity, action, filter, actionData } = w;
|
||||
const filter2 = typeof filter === 'function' ? filter() : filter;
|
||||
const filter2 = typeof filter === 'function' ? await filter() : filter;
|
||||
const data = typeof actionData === 'function' ? await actionData() : actionData; // 这里有个奇怪的编译错误,不理解 by Xc
|
||||
const result = await dbStore.operate(entity, {
|
||||
id: await (0, uuid_1.generateNewIdAsync)(),
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ function startWatchers<ED extends EntityDict & BaseEntityDict, Cxt extends Async
|
|||
try {
|
||||
if (w.hasOwnProperty('actionData')) {
|
||||
const { entity, action, filter, actionData } = <BBWatcher<ED, keyof ED>>w;
|
||||
const filter2 = typeof filter === 'function' ? filter() : filter;
|
||||
const filter2 = typeof filter === 'function' ? await filter() : filter;
|
||||
const data = typeof actionData === 'function' ? await (actionData as any)() : actionData; // 这里有个奇怪的编译错误,不理解 by Xc
|
||||
const result = await dbStore.operate(entity, {
|
||||
id: await generateNewIdAsync(),
|
||||
|
|
|
|||
Loading…
Reference in New Issue