You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks like the instance.cached_options object is empty on global toasts.
For the moment I just modified the if in _goAway to check if position is defined and avoid the error: if (instance.cached_options.position && instance.cached_options.position.includes('bottom')) {
This is the definition of the global toast done in main.js right after setting up Toasted.
Vue.use(Toasted, {
position: 'top-right',
duration: 5000,
theme: 'primary'
})
Vue.toasted.register('cookieNotification',
(thisVue) => {
// Use thisVue instance to resolve some routes in here
var toastContent = 'some notification content'
return toastContent
},
{type: 'info',
position: 'bottom-right',
duration: null,
className: 'cookie-alert',
onComplete: function () {
var d = new Date()
d.setTime(d.getTime() + (14 * 24 * 60 * 60 * 1000))
var expires = 'expires=' + d.toUTCString()
document.cookie = 'cookieNotice=true;' + expires + ';path=/'
},
action: {
text: 'X',
onClick: (e, toastObject) => {
var d = new Date()
d.setTime(d.getTime() + (14 * 24 * 60 * 60 * 1000))
var expires = 'expires=' + d.toUTCString()
document.cookie = 'cookieNotice=true;' + expires + ';path=/'
toastObject.goAway(0) //This is where the issue occurs
}
}
}
)
The text was updated successfully, but these errors were encountered:
It looks like the instance.cached_options object is empty on global toasts.
For the moment I just modified the if in _goAway to check if position is defined and avoid the error:
if (instance.cached_options.position && instance.cached_options.position.includes('bottom')) {
This is the definition of the global toast done in main.js right after setting up Toasted.
The text was updated successfully, but these errors were encountered: