New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@alfalab/core-components-portal

Package Overview
Dependencies
Maintainers
18
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@alfalab/core-components-portal - npm Package Compare versions

Comparing version 3.1.0 to 3.1.1

2

Component.js

@@ -12,3 +12,3 @@ 'use strict';

var _d = react.useState(function () {
return immediateMount ? getPortalContainer() : null;
return typeof window !== 'undefined' && immediateMount ? getPortalContainer() : null;
}), mountNode = _d[0], setMountNode = _d[1];

@@ -15,0 +15,0 @@ react.useEffect(function () {

@@ -12,3 +12,3 @@ 'use strict';

var _d = react.useState(function () {
return immediateMount ? getPortalContainer() : null;
return typeof window !== 'undefined' && immediateMount ? getPortalContainer() : null;
}), mountNode = _d[0], setMountNode = _d[1];

@@ -15,0 +15,0 @@ react.useEffect(function () {

@@ -8,3 +8,3 @@ import { forwardRef, useState, useEffect } from 'react';

var _d = useState(function () {
return immediateMount ? getPortalContainer() : null;
return typeof window !== 'undefined' && immediateMount ? getPortalContainer() : null;
}), mountNode = _d[0], setMountNode = _d[1];

@@ -11,0 +11,0 @@ useEffect(function () {

@@ -6,3 +6,3 @@ import { forwardRef, useState, useEffect } from 'react';

const Portal = forwardRef(({ getPortalContainer = getDefaultPortalContainer, immediateMount = false, children }, ref) => {
const [mountNode, setMountNode] = useState(() => immediateMount ? getPortalContainer() : null);
const [mountNode, setMountNode] = useState(() => typeof window !== 'undefined' && immediateMount ? getPortalContainer() : null);
useEffect(() => {

@@ -9,0 +9,0 @@ setMountNode(getPortalContainer());

{
"name": "@alfalab/core-components-portal",
"version": "3.1.0",
"version": "3.1.1",
"description": "Portal component",

@@ -5,0 +5,0 @@ "keywords": [],

@@ -58,3 +58,3 @@ const http = require('http');

return new Promise((resolve, reject) => {
const req = http.request(options, res => {
const req = http.request(options, (res) => {
res.on('end', () => {

@@ -61,0 +61,0 @@ resolve();

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