@inglorious/web 5.0.0 → 5.0.2
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/package.json +1 -1
- package/src/mount.js +1 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inglorious/web",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.2",
|
|
4
4
|
"description": "A new web framework that leverages the power of the Inglorious Store combined with the performance and simplicity of lit-html.",
|
|
5
5
|
"author": "IceOnFire <antony.mistretta@gmail.com> (https://ingloriouscoderz.it)",
|
|
6
6
|
"license": "MIT",
|
package/src/mount.js
CHANGED
|
@@ -16,14 +16,13 @@ export async function mount(store, renderFn, element) {
|
|
|
16
16
|
const api = { ...store._api }
|
|
17
17
|
api.render = createRender(api)
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
const shouldHydrate = element.hasChildNodes()
|
|
20
20
|
|
|
21
21
|
// If we need to hydrate, load the heavy lifting only now
|
|
22
22
|
if (shouldHydrate) {
|
|
23
23
|
const { hydrate } = await import("@lit-labs/ssr-client")
|
|
24
24
|
const template = renderFn(api)
|
|
25
25
|
hydrate(template, element)
|
|
26
|
-
shouldHydrate = false
|
|
27
26
|
}
|
|
28
27
|
|
|
29
28
|
const unsubscribe = store.subscribe(() => {
|