We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ab9654b commit 92a62e8Copy full SHA for 92a62e8
src/api/data.js
@@ -119,7 +119,7 @@ exports.$interpolate = function (text) {
119
var vm = this
120
if (tokens) {
121
if (tokens.length === 1) {
122
- return vm.$eval(tokens[0].value)
+ return vm.$eval(tokens[0].value) + ''
123
} else {
124
return tokens.map(function (token) {
125
return token.tag
test/unit/specs/api/data_spec.js
@@ -145,6 +145,7 @@ describe('Data API', function () {
145
146
it('$interpolate', function () {
147
expect(vm.$interpolate('abc')).toBe('abc')
148
+ expect(vm.$interpolate('{{a}}')).toBe('1')
149
expect(vm.$interpolate('{{a}} and {{a + b.c | double}}')).toBe('1 and 6')
150
})
151
0 commit comments