🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@dhis2-ui/portal

Package Overview
Dependencies
Maintainers
2
Versions
320
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dhis2-ui/portal - npm Package Compare versions

Comparing version

to
8.14.6

6

build/cjs/portal.js

@@ -24,4 +24,6 @@ "use strict";

* As a fallback, portals will be attached to the document body.
*
* This needs to be a function so that it works in tests as well.
*/
const defaultNode = document.getElementById('dhis2-portal-root') || document.body;
const getDefaultNode = () => document.getElementById('dhis2-portal-root') || document.body;

@@ -36,3 +38,3 @@ const Portal = _ref => {

(0, _react.useEffect)(() => {
setMountNode(node || defaultNode);
setMountNode(node || getDefaultNode());
}, [node]);

@@ -39,0 +41,0 @@

@@ -12,5 +12,8 @@ import PropTypes from 'prop-types';

* As a fallback, portals will be attached to the document body.
*
* This needs to be a function so that it works in tests as well.
*/
const defaultNode = document.getElementById('dhis2-portal-root') || document.body;
const getDefaultNode = () => document.getElementById('dhis2-portal-root') || document.body;
export const Portal = _ref => {

@@ -24,3 +27,3 @@ let {

useEffect(() => {
setMountNode(node || defaultNode);
setMountNode(node || getDefaultNode());
}, [node]);

@@ -27,0 +30,0 @@

{
"name": "@dhis2-ui/portal",
"version": "8.14.5",
"version": "8.14.6",
"description": "UI Portal",

@@ -5,0 +5,0 @@ "repository": {