react-sizes
Advanced tools
Comparing version 1.0.0-beta.0 to 1.0.0-beta.1
@@ -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 @@ } |
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
29626
399