我在我的 vue 对象中有这个方法:
fetchStates: function () {
this.$http.get('/api/locations/all_states').then((response) => {
states = $.parseJSON(response.responseText).states
this.$set('states', states)
}).then(() => {
$('.cs-select').trigger('chosen:updated')
})
},
在资产预编译期间,我收到此错误:
ExecJS::ProgramError: Unexpected token: operator (>) (line: 62960, col: 69, pos: 1897152)
我设法找到了它的来源.then((response) => {
,但不知道如何解决这个问题。可能是ExecJS不知道vue-resource 中的 Promise 语法。任何帮助表示赞赏。