I have a subscribe button I've written a small function but am getting the error above
methods: {
subscribe(){
firebase.messaging.requestPermission()
.then(() => {
console.log('Notification permission granted.');
return this.messaging.getToken();
})
}
}
Button
<button id="subscribe" @click="subscribe">Subscribe</button>