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

react-portal-popover

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-portal-popover - npm Package Compare versions

Comparing version 0.1.9 to 0.1.10

17

lib/components/OverlayTrigger.js

@@ -63,4 +63,10 @@ 'use strict';

}, {
key: 'componentDidUpdate',
value: function componentDidUpdate() {
this.isNodeMounted = true;
}
}, {
key: 'componentWillUnmount',
value: function componentWillUnmount() {
this.isNodeMounted = false;
this.removeCloseHandler();

@@ -88,8 +94,9 @@ }

this.removeCloseHandler();
// Prevent race with toggleOverlay
setTimeout(function () {
_this3.setState({
open: false
});
if (_this3.isNodeMounted) {
_this3.setState({
open: false
});
_this3.removeCloseHandler();
}
}, 0);

@@ -96,0 +103,0 @@ }

{
"name": "react-portal-popover",
"version": "0.1.9",
"version": "0.1.10",
"description": "Popover for React using portals",

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

@@ -35,3 +35,8 @@ import React from 'react';

componentDidUpdate() {
this.isNodeMounted = true;
}
componentWillUnmount() {
this.isNodeMounted = false;
this.removeCloseHandler();

@@ -53,8 +58,9 @@ }

onClose() {
this.removeCloseHandler();
// Prevent race with toggleOverlay
setTimeout(() => {
this.setState({
open: false,
});
if (this.isNodeMounted) {
this.setState({
open: false,
});
this.removeCloseHandler();
}
}, 0);

@@ -61,0 +67,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