mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-16 21:00:40 -07:00
fix: address refactor comments
This commit is contained in:
committed by
Jun Yang
parent
b8e4b3337b
commit
6a0ad102a8
@@ -1,6 +1,5 @@
|
||||
import { Value } from './value'
|
||||
import { FilterMap } from './filter/filter-map'
|
||||
import { stringify, toValue } from '../util/underscore'
|
||||
import { TemplateImpl } from '../template/template-impl'
|
||||
import { Template } from '../template/template'
|
||||
import { Context } from '../context/context'
|
||||
@@ -16,10 +15,6 @@ export class Output extends TemplateImpl<OutputToken> implements Template {
|
||||
}
|
||||
public * render (ctx: Context, emitter: Emitter) {
|
||||
const val = yield this.value.value(ctx)
|
||||
if (ctx.opts.keepOutputType) {
|
||||
emitter.write(toValue(val))
|
||||
} else {
|
||||
emitter.write(stringify(toValue(val)))
|
||||
}
|
||||
emitter.write(val)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user