fix: coerce to Array in map and where filter

This commit is contained in:
harttle
2020-04-01 02:22:44 +08:00
parent d65ed408f0
commit c923598b40
12 changed files with 187 additions and 284 deletions
-1
View File
@@ -16,7 +16,6 @@ export class Value {
const tokenizer = new Tokenizer(str)
this.initial = tokenizer.readValue()
this.filters = tokenizer.readFilters().map(({ name, args }) => new Filter(name, this.filterMap.get(name), args))
tokenizer.skipBlank()
}
public * value (ctx: Context) {
let val = yield evalToken(this.initial, ctx)