Open greendrake opened 2 years ago
for others who may face this issue, here's a (ugly) workaround
import { useCookie } from 'vue-cookie-next'
const { removeCookie, isCookieAvailable } = useCookie()
...
// removeCookie("USER_ID") TypeError: Cannot read properties of undefined (reading 'isCookieAvailable')
removeCookie.bind({ isCookieAvailable: isCookieAvailable})("USER_ID")
There is no
this
inside theremoveCookie
method when using the composition API (it is used to callisCookieAvailable
).