nuxt-viewport
Advanced tools
Comparing version 0.0.5 to 0.0.6
@@ -5,2 +5,9 @@ # Changelog | ||
### [0.0.6](https://github.com/mvrlin/nuxt-viewport/compare/v0.0.5...v0.0.6) (2021-06-17) | ||
### Bug Fixes | ||
* **runtime:** detect breakpoint only with headers ([cfa8719](https://github.com/mvrlin/nuxt-viewport/commit/cfa8719906d4416dce92ff4ab552e948c88c090b)) | ||
### [0.0.5](https://github.com/mvrlin/nuxt-viewport/compare/v0.0.4...v0.0.5) (2021-06-17) | ||
@@ -7,0 +14,0 @@ |
@@ -11,13 +11,9 @@ import cookie from 'cookie' | ||
let cookieViewport = '' | ||
let requestCookies = {} | ||
let userAgent = '' | ||
let breakpoint = options.fallbackBreakpoint | ||
if (req.headers) { | ||
requestCookies = cookie.parse(req.headers.cookie || '') | ||
cookieViewport = requestCookies[options.cookieName] | ||
userAgent = req.headers['user-agent'] | ||
const requestCookies = cookie.parse(req.headers.cookie || '') | ||
breakpoint = await detectBreakpoint.call(options, requestCookies[options.cookieName], req.headers['user-agent']) | ||
} | ||
const breakpoint = await detectBreakpoint.call(options, cookieViewport, userAgent) | ||
const viewport = useViewport(options, breakpoint) | ||
@@ -24,0 +20,0 @@ |
{ | ||
"name": "nuxt-viewport", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"description": "Define custom viewports for your Nuxt project", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16907
313