nuxt-modules / device

Nuxt module for detecting device type.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Custom flag in Nuxt 3

zerosdev opened this issue · comments

How to make a plugin to add custom flag in Nuxt 3 ? I tried this but not working

export default defineNuxtPlugin((nuxtApp) => {
    let webview = useCookie('webview')
    let device = useDevice()
    device.isWebview = webview && webview.value !== null;
})

Try with this
device.isWebview = webview !== null ? webview.value : false;

Try with this device.isWebview = webview !== null ? webview.value : false;

Still not working