Skip to content

Commit

Permalink
fix: compile call expression twice got error
Browse files Browse the repository at this point in the history
  • Loading branch information
meixg committed Dec 3, 2021
1 parent b6a21f0 commit 0329a1d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/compilers/san-expr-compiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export function dataAccess (accessorExpr: ExprAccessorNode, outputType: OutputTy

// 生成调用表达式代码
function callExpr (callExpr: ExprCallNode, outputType: OutputType) {
const paths = callExpr.name.paths
const paths = callExpr.name.paths.slice()
let fn = new BinaryExpression(I('ctx'), '.', I('instance'))
fn = new BinaryExpression(fn, '.', I(paths.shift()!.value))
for (const path of paths) {
Expand Down

0 comments on commit 0329a1d

Please sign in to comment.