@backmatter/next 0.0.17 → 0.0.18
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/routes.ts +4 -6
package/package.json
CHANGED
package/src/routes.ts
CHANGED
|
@@ -177,11 +177,9 @@ export function createCatchAll<Models extends readonly ModelDef[]>(
|
|
|
177
177
|
? await renderPage(doc, options.blocks, options.fallbacks)
|
|
178
178
|
: await renderDoc(doc, { components: options.components });
|
|
179
179
|
let body = rendered;
|
|
180
|
-
if (
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
}
|
|
184
|
-
if (previewEnabled && isPage) {
|
|
180
|
+
if (previewEnabled) {
|
|
181
|
+
// Refresh on the server. Passing the host component map into the client
|
|
182
|
+
// preview wrapper is not serializable and crashes the page.
|
|
185
183
|
const { PreviewPageReloader } = await import("./preview-refresh");
|
|
186
184
|
body = createElement(
|
|
187
185
|
"div",
|
|
@@ -191,7 +189,7 @@ export function createCatchAll<Models extends readonly ModelDef[]>(
|
|
|
191
189
|
type: doc.type,
|
|
192
190
|
slug: doc.slug,
|
|
193
191
|
}),
|
|
194
|
-
|
|
192
|
+
rendered,
|
|
195
193
|
);
|
|
196
194
|
}
|
|
197
195
|
const layout = options.layouts?.[doc.type];
|