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

react-resize-detector

Package Overview
Dependencies
Maintainers
1
Versions
117
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-resize-detector - npm Package Compare versions

Comparing version 4.1.0 to 4.1.1

12

lib/components/ResizeDetector.js

@@ -90,6 +90,6 @@ "use strict";

querySelector = _this$props.querySelector,
parentRef = _this$props.parentRef;
targetDomEl = _this$props.targetDomEl;
if ((0, _utils.isSSR)()) return undefined;
if (querySelector) return document.querySelector(querySelector);
if (parentRef && _this.isDOMElement(parentRef)) return parentRef; // eslint-disable-next-line react/no-find-dom-node
if (targetDomEl && _this.isDOMElement(targetDomEl)) return targetDomEl; // eslint-disable-next-line react/no-find-dom-node

@@ -196,2 +196,4 @@ var currentElement = _this.element && (0, _reactDom.findDOMNode)(_this.element);

console.log(renderType);
switch (renderType) {

@@ -211,3 +213,3 @@ case 'renderProp':

return children.map(function (el) {
return (0, _react.cloneElement)(el, childProps);
return !!el && (0, _react.cloneElement)(el, childProps);
});

@@ -274,3 +276,3 @@

querySelector: _propTypes.string,
parentRef: (0, _propTypes.oneOfType)([(0, _propTypes.instanceOf)(Element), (0, _propTypes.instanceOf)(HTMLDocument)]),
targetDomEl: (0, _propTypes.oneOfType)([(0, _propTypes.instanceOf)(Element), (0, _propTypes.instanceOf)(HTMLDocument)]),
onResize: _propTypes.func,

@@ -290,3 +292,3 @@ render: _propTypes.func,

querySelector: null,
parentRef: null,
targetDomEl: null,
onResize: null,

@@ -293,0 +295,0 @@ render: undefined,

@@ -73,6 +73,6 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }

querySelector = _this$props.querySelector,
parentRef = _this$props.parentRef;
targetDomEl = _this$props.targetDomEl;
if (isSSR()) return undefined;
if (querySelector) return document.querySelector(querySelector);
if (parentRef && _this.isDOMElement(parentRef)) return parentRef; // eslint-disable-next-line react/no-find-dom-node
if (targetDomEl && _this.isDOMElement(targetDomEl)) return targetDomEl; // eslint-disable-next-line react/no-find-dom-node

@@ -179,2 +179,4 @@ var currentElement = _this.element && findDOMNode(_this.element);

console.log(renderType);
switch (renderType) {

@@ -194,3 +196,3 @@ case 'renderProp':

return children.map(function (el) {
return cloneElement(el, childProps);
return !!el && cloneElement(el, childProps);
});

@@ -257,3 +259,3 @@

querySelector: string,
parentRef: oneOfType([instanceOf(Element), instanceOf(HTMLDocument)]),
targetDomEl: oneOfType([instanceOf(Element), instanceOf(HTMLDocument)]),
onResize: func,

@@ -273,3 +275,3 @@ render: func,

querySelector: null,
parentRef: null,
targetDomEl: null,
onResize: null,

@@ -276,0 +278,0 @@ render: undefined,

@@ -46,3 +46,3 @@ {

"author": "Vitalii Maslianok <maslianok@gmail.com> (https://github.com/maslianok)",
"version": "4.1.0",
"version": "4.1.1",
"bugs": {

@@ -49,0 +49,0 @@ "url": "https://github.com/maslianok/react-resize-detector/issues"

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