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 57742c3 commit 4e75f04Copy full SHA for 4e75f04
src/api/data.js
@@ -133,7 +133,7 @@ exports.$interpolate = function (text) {
133
var vm = this
134
if (tokens) {
135
if (tokens.length === 1) {
136
- return vm.$eval(tokens[0].value)
+ return vm.$eval(tokens[0].value) + ''
137
} else {
138
return tokens.map(function (token) {
139
return token.tag
test/unit/specs/api/data_spec.js
@@ -156,6 +156,7 @@ describe('Data API', function () {
156
157
it('$interpolate', function () {
158
expect(vm.$interpolate('abc')).toBe('abc')
159
+ expect(vm.$interpolate('{{a}}')).toBe('1')
160
expect(vm.$interpolate('{{a}} and {{a + b.c | double}}')).toBe('1 and 6')
161
})
162
0 commit comments