mirror of
https://github.com/hexastack/hexabot
synced 2025-02-02 07:35:38 +00:00
fix: update context-var.service getContextVarsByBlock method
This commit is contained in:
parent
7f6b481988
commit
b574295d8c
@ -36,7 +36,7 @@ export class ContextVarService extends BaseService<
|
||||
block: Block | BlockFull,
|
||||
): Promise<Record<string, ContextVar>> {
|
||||
const vars = await this.find({
|
||||
name: { $in: block.capture_vars?.map(({ context_var }) => context_var) },
|
||||
name: { $in: block.capture_vars.map(({ context_var }) => context_var) },
|
||||
});
|
||||
return vars.reduce((acc, cv) => {
|
||||
acc[cv.name] = cv;
|
||||
|
Loading…
Reference in New Issue
Block a user