Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nuxt-viewport

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nuxt-viewport - npm Package Compare versions

Comparing version 0.0.5 to 0.0.6

7

CHANGELOG.md

@@ -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 @@

10

lib/runtime/plugin.server.js

@@ -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": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc