mirror of
https://github.com/locomotivemtl/locomotive-boilerplate.git
synced 2026-01-15 00:55:08 +08:00
Fix device detection on config.js
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
*/
|
||||
|
||||
const NODE_ENV = process.env.NODE_ENV
|
||||
const IS_DESKTOP = typeof window.orientation === 'undefined'
|
||||
const IS_MOBILE = window.matchMedia('(any-pointer:coarse)').matches
|
||||
|
||||
// Main environment variables
|
||||
const ENV = Object.freeze({
|
||||
@@ -19,8 +19,8 @@ const ENV = Object.freeze({
|
||||
IS_DEV: NODE_ENV === 'development',
|
||||
|
||||
// Device
|
||||
IS_DESKTOP,
|
||||
IS_MOBILE: !IS_DESKTOP,
|
||||
IS_MOBILE,
|
||||
IS_DESKTOP: !IS_MOBILE,
|
||||
})
|
||||
|
||||
// Main CSS classes used within the project
|
||||
|
||||
Reference in New Issue
Block a user