Comparing version 5.24.2 to 5.24.3
@@ -101,7 +101,10 @@ import canUseDom from './canUseDom'; | ||
} | ||
export function updateCSS(css, key) { | ||
var option = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; | ||
var container = getContainer(option); // Get real parent | ||
/** | ||
* qiankun will inject `appendChild` to insert into other | ||
*/ | ||
if (!containerCache.has(container)) { | ||
function syncRealContainer(container, option) { | ||
var cachedRealContainer = containerCache.get(container); // Find real container when not cached or cached container removed | ||
if (!cachedRealContainer || !document.contains(cachedRealContainer)) { | ||
var placeholderStyle = injectCSS('', option); | ||
@@ -112,3 +115,9 @@ var parentNode = placeholderStyle.parentNode; | ||
} | ||
} | ||
export function updateCSS(css, key) { | ||
var option = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; | ||
var container = getContainer(option); // Sync real parent | ||
syncRealContainer(container, option); | ||
var existNode = findExistNode(key, option); | ||
@@ -115,0 +124,0 @@ |
@@ -113,8 +113,11 @@ "use strict"; | ||
} | ||
/** | ||
* qiankun will inject `appendChild` to insert into other | ||
*/ | ||
function updateCSS(css, key) { | ||
var option = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; | ||
var container = getContainer(option); // Get real parent | ||
if (!containerCache.has(container)) { | ||
function syncRealContainer(container, option) { | ||
var cachedRealContainer = containerCache.get(container); // Find real container when not cached or cached container removed | ||
if (!cachedRealContainer || !document.contains(cachedRealContainer)) { | ||
var placeholderStyle = injectCSS('', option); | ||
@@ -125,3 +128,9 @@ var parentNode = placeholderStyle.parentNode; | ||
} | ||
} | ||
function updateCSS(css, key) { | ||
var option = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; | ||
var container = getContainer(option); // Sync real parent | ||
syncRealContainer(container, option); | ||
var existNode = findExistNode(key, option); | ||
@@ -128,0 +137,0 @@ |
{ | ||
"name": "rc-util", | ||
"version": "5.24.2", | ||
"version": "5.24.3", | ||
"description": "Common Utils For React Component", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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
204891
6227