elegance-js 2.1.2 → 2.1.3
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/client/client.mjs +10 -10
- package/package.json +1 -1
package/dist/client/client.mjs
CHANGED
|
@@ -340,16 +340,6 @@ var loadPage = async (previousPage = null) => {
|
|
|
340
340
|
xmlSerializer.serializeToString(doc)
|
|
341
341
|
);
|
|
342
342
|
history.replaceState(null, "", fixedUrl.href);
|
|
343
|
-
{
|
|
344
|
-
const pageDataScript = document.head.querySelector(`script[data-page="true"][data-pathname="${sanitizePathname(pathname)}"]`);
|
|
345
|
-
const { data } = await import(pageDataScript.src);
|
|
346
|
-
if (!pd[pathname]) pd[pathname] = data;
|
|
347
|
-
{
|
|
348
|
-
const dataScript = document.querySelector(`script[data-hook="true"][data-pathname="${sanitizePathname(pathname)}"]`);
|
|
349
|
-
if (dataScript) dataScript.remove();
|
|
350
|
-
}
|
|
351
|
-
initPageData(pd[pathname], currentPage, previousPage, 1 /* STRICT */);
|
|
352
|
-
}
|
|
353
343
|
{
|
|
354
344
|
const parts = window.location.pathname.split("/").filter(Boolean);
|
|
355
345
|
const paths = [
|
|
@@ -370,6 +360,16 @@ var loadPage = async (previousPage = null) => {
|
|
|
370
360
|
initPageData(ld[pathname], path, previousPage, 2 /* SCOPED */);
|
|
371
361
|
}
|
|
372
362
|
}
|
|
363
|
+
{
|
|
364
|
+
const pageDataScript = document.head.querySelector(`script[data-page="true"][data-pathname="${sanitizePathname(pathname)}"]`);
|
|
365
|
+
const { data } = await import(pageDataScript.src);
|
|
366
|
+
if (!pd[pathname]) pd[pathname] = data;
|
|
367
|
+
{
|
|
368
|
+
const dataScript = document.querySelector(`script[data-hook="true"][data-pathname="${sanitizePathname(pathname)}"]`);
|
|
369
|
+
if (dataScript) dataScript.remove();
|
|
370
|
+
}
|
|
371
|
+
initPageData(pd[pathname], currentPage, previousPage, 1 /* STRICT */);
|
|
372
|
+
}
|
|
373
373
|
console.info(
|
|
374
374
|
`Loading finished, cleanupProcedures are currently:`,
|
|
375
375
|
cleanupProcedures
|