@solidjs/start 0.4.0-alpha.7 → 0.4.0-alpha.8
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.
|
@@ -69,7 +69,7 @@ async function fetchServerFunction(base, id, args) {
|
|
|
69
69
|
const instance = `server-fn:${INSTANCE++}`;
|
|
70
70
|
const response = await (args.length === 1 && args[0] instanceof FormData
|
|
71
71
|
? createRequest(base, id, instance, args[0])
|
|
72
|
-
: createRequest(base, id, instance, JSON.stringify(await toJSONAsync(args)), "application/json"));
|
|
72
|
+
: createRequest(base, id, instance, JSON.stringify(await Promise.resolve(toJSONAsync(args))), "application/json"));
|
|
73
73
|
|
|
74
74
|
if (response.headers.get("Location")) throw response;
|
|
75
75
|
if (response.headers.get("X-Revalidate")) {
|
package/package.json
CHANGED
package/server/StartServer.tsx
CHANGED
|
@@ -21,7 +21,7 @@ export function StartServer(props: { document: Component<DocumentComponentProps>
|
|
|
21
21
|
let assets = [];
|
|
22
22
|
Promise.resolve().then(async () => {
|
|
23
23
|
let current = context.routes;
|
|
24
|
-
if (context.routerMatches[0]) {
|
|
24
|
+
if (context.routerMatches && context.routerMatches[0]) {
|
|
25
25
|
for (let i = 0; i < context.routerMatches[0].length; i++) {
|
|
26
26
|
const match = context.routerMatches[0][i];
|
|
27
27
|
if (match.metadata && match.metadata.filesystem) {
|
|
@@ -41,7 +41,7 @@ export function StartServer(props: { document: Component<DocumentComponentProps>
|
|
|
41
41
|
);
|
|
42
42
|
});
|
|
43
43
|
|
|
44
|
-
useAssets(() => assets.map(m => renderAsset(m)));
|
|
44
|
+
useAssets(() => assets.length ? assets.map(m => renderAsset(m)) : undefined);
|
|
45
45
|
|
|
46
46
|
return (
|
|
47
47
|
<NoHydration>
|