fix: pass drops directly to filters/tags

This commit is contained in:
harttle
2019-05-12 20:03:32 +08:00
parent 4282accaa2
commit bef290923c
15 changed files with 93 additions and 42 deletions
+2 -2
View File
@@ -1,4 +1,4 @@
import { evalExp } from '../render/syntax'
import { parseExp } from '../render/syntax'
import { FilterArgs, Filter } from './filter/filter'
import Context from '../context/context'
@@ -48,7 +48,7 @@ export default class Value {
this.filters.push(new Filter(name, args, this.strictFilters))
}
async value (ctx: Context) {
let val = await evalExp(this.initial, ctx)
let val = await parseExp(this.initial, ctx)
for (const filter of this.filters) {
val = await filter.render(val, ctx)
}