[Solved] How can we test $q.platform on boot files?
-
I’m initializing a db using a cordova plugin.
I’d like in the boot to detect if app is running on mobile, before even try to open db.
I tried the following
export default async ({ Vue }) => { if (!Vue.$q.platform.is.mobile) { return } ...
But Vue.$q is undefined here
-
Solved… read the doc. …
// import something here import { Platform } from 'quasar' export default async (/* { Vue } */) => { if (!Platform.is.mobile) { return }