Correct small errors

This commit is contained in:
2026-04-08 12:27:00 +02:00
parent 557bd1428a
commit 9c0acb83f8

9
sw.js
View File

@@ -1,6 +1,6 @@
const isFunction = (value) => typeof value === 'function';
const isNode = (value) => value instanceof Node;
const get = (sig) => (sig?._isSignal ? sig.value : (isFn(sig) ? sig() : sig));
const get = (sig) => (sig?._isSignal ? sig.value : (isFunction(sig) ? sig() : sig));
// --- Schedule System ---
let isScheduled = false;
@@ -300,7 +300,7 @@ export const Router = (routes) => {
}
}
const fallback = routes.find(r => r.path === '*');
return fallback ? h(fbk.component) : '404';
return fallback ? h(fallback.component) : '404';
});
};
@@ -314,6 +314,11 @@ export const mount = (root, target, props = {}) => {
const el = h(root, props);
container.appendChild(el);
if (el.$context) {
el.$context.mountHooks.forEach(hook => hook());
el.$context.mountHooks.length = 0;
}
return () => remove(el);
};