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

react-sizes

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-sizes - npm Package Compare versions

Comparing version 1.0.0-beta.0 to 1.0.0-beta.1

10

lib/withSizes.js

@@ -85,7 +85,7 @@ 'use strict';

_this.getWindowSizesWithFallback = function () {
var _this$context = _this.context,
_this$context$fallbac = _this$context.fallbackHeight,
fallbackHeight = _this$context$fallbac === undefined ? null : _this$context$fallbac,
_this$context$fallbac2 = _this$context.fallbackWidth,
fallbackWidth = _this$context$fallbac2 === undefined ? null : _this$context$fallbac2;
var config = _this.context[_contextTypes.contextKey] || {};
var _config$fallbackHeigh = config.fallbackHeight,
fallbackHeight = _config$fallbackHeigh === undefined ? null : _config$fallbackHeigh,
_config$fallbackWidth = config.fallbackWidth,
fallbackWidth = _config$fallbackWidth === undefined ? null : _config$fallbackWidth;

@@ -92,0 +92,0 @@ return (0, _getWindowSizes2.default)({ fallbackHeight: fallbackHeight, fallbackWidth: fallbackWidth });

{
"name": "react-sizes",
"version": "1.0.0-beta.0",
"version": "1.0.0-beta.1",
"description": "Hoc to easily map window sizes to props.",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -258,3 +258,3 @@ ![react-sizes](./logo.png)

fallbackWidth: 1280,
fallbackHeiht: 700,
fallbackHeight: 700,
}

@@ -261,0 +261,0 @@ }

@@ -10,3 +10,3 @@ /* eslint-disable no-console */

import contextTypes from './contextTypes'
import contextTypes, { contextKey } from './contextTypes'
import * as presets from './presets'

@@ -28,3 +28,4 @@

this.getWindowSizesWithFallback = () => {
const { fallbackHeight = null, fallbackWidth = null } = this.context
const config = this.context[contextKey] || {}
const { fallbackHeight = null, fallbackWidth = null } = config
return getWindowSizes({ fallbackHeight, fallbackWidth })

@@ -31,0 +32,0 @@ }

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