wu-framework 1.1.10 → 1.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/wu-framework.cjs.js +1 -1
- package/dist/wu-framework.cjs.js.map +1 -1
- package/dist/wu-framework.dev.js +1 -1
- package/dist/wu-framework.dev.js.map +1 -1
- package/dist/wu-framework.esm.js +1 -1
- package/dist/wu-framework.esm.js.map +1 -1
- package/dist/wu-framework.umd.js +1 -1
- package/dist/wu-framework.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/adapters/react/index.js +7 -5
- package/src/core/wu-performance.js +1 -1
package/package.json
CHANGED
|
@@ -174,9 +174,13 @@ async function register(appName, Component, options = {}) {
|
|
|
174
174
|
return;
|
|
175
175
|
}
|
|
176
176
|
|
|
177
|
-
//
|
|
178
|
-
|
|
179
|
-
|
|
177
|
+
// Si ya está montado en el MISMO container, ignorar (StrictMode double-mount)
|
|
178
|
+
const existing = adapterState.roots.get(appName);
|
|
179
|
+
if (existing) {
|
|
180
|
+
if (existing.container === container) {
|
|
181
|
+
return; // Ya montado aquí, nada que hacer
|
|
182
|
+
}
|
|
183
|
+
// Diferente container → desmontar primero
|
|
180
184
|
unmountApp();
|
|
181
185
|
}
|
|
182
186
|
|
|
@@ -192,8 +196,6 @@ async function register(appName, Component, options = {}) {
|
|
|
192
196
|
root.render(element);
|
|
193
197
|
adapterState.roots.set(appName, { root, container });
|
|
194
198
|
|
|
195
|
-
console.log(`[WuReact] ✅ ${appName} mounted successfully`);
|
|
196
|
-
|
|
197
199
|
if (onMount) {
|
|
198
200
|
onMount(container);
|
|
199
201
|
}
|
|
@@ -50,7 +50,7 @@ export class WuPerformance {
|
|
|
50
50
|
const startTime = this.marks.get(markName);
|
|
51
51
|
|
|
52
52
|
if (!startTime) {
|
|
53
|
-
|
|
53
|
+
// Puede ocurrir en React StrictMode (doble mount) — no es un error
|
|
54
54
|
return 0;
|
|
55
55
|
}
|
|
56
56
|
|