File tree 2 files changed +3
-2
lines changed
2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -169,7 +169,8 @@ function inlineFilters (exp) {
169
169
var args = filter . args
170
170
? ',"' + filter . args . join ( '","' ) + '"'
171
171
: ''
172
- exp = 'this.$options.filters["' + filter . name + '"]' +
172
+ filter = 'this.$options.filters["' + filter . name + '"]'
173
+ exp = '(' + filter + '.read||' + filter + ')' +
173
174
'.apply(this,[' + exp + args + '])'
174
175
}
175
176
return exp
Original file line number Diff line number Diff line change @@ -119,7 +119,7 @@ describe('Text Parser', function () {
119
119
it ( 'tokens to expression with filters, multiple expressions' , function ( ) {
120
120
var tokens = textParser . parse ( 'a {{b | c d}} e' )
121
121
var exp = textParser . tokensToExp ( tokens )
122
- expect ( exp ) . toBe ( '"a "+this.$options.filters["c"].apply(this,[b,"d"])+" e"' )
122
+ expect ( exp ) . toBe ( '"a "+( this.$options.filters["c"].read||this.$options.filters["c"]) .apply(this,[b,"d"])+" e"' )
123
123
} )
124
124
125
125
} )
You can’t perform that action at this time.
0 commit comments