startAudio (audio) {
const audioTrack = new Howl({
xhr: { method: 'POST' },
src: [audio.audio],
onplay () {
console.log('Start!') // Тут проверял
},
onend () {
this.isTargeted = null
}
})
if (this.isTargeted === null) {
this.isTargeted = audio.id
audioTrack.play()
} else {
audioTrack.pause()
this.isTargeted = null
}
}
API.interceptors.response.use(
response => {
if (response.data instanceof Blob) {
return response.data;
}
return response.data.data || {};
},
error => {
if (error.response) {
Vue.prototype.$buefy.toast.open({
message: error.response.data.message || "Something went wrong",
type: "is-danger"
});
} else {
Vue.prototype.$buefy.toast.open({
message: "Unable to connect to server",
type: "is-danger"
});
}
return Promise.reject(error);
}
)
catch (error) { }
? router.beforeEach((to, from, next) => {
if (to.matched.some(record => record.meta.requiresAuth)) {
if (localStorage.getItem('access_token') == null) {
next({ name: 'Login' })
} else {
if (Store.getters.isLoggedIn) {
next()
return
}
next({ name: 'Feed' })
}
} else if (to.matched.some(record => record.meta.guest)) {
if (localStorage.getItem('access_token') == null) {
next()
} else {
next({ name: 'Feed' })
}
} else {
next()
}
})
Все отлично присваивается, но когда вставляю в html значение, оно выдает null