Skip to content

Commit bc2dbf6

Browse files
committed
fix(cms): live preview should only be enabled in tenant mode
1 parent 2348e48 commit bc2dbf6

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

apps/cms/src/payload.config.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ export default buildConfig({
6767
],
6868
collections: ['pages', 'posts'],
6969
url: ({ data, collectionConfig, locale }) => {
70+
// Live preview in not enabled in host mode
71+
if (env.APP_MODE.type === 'host') {
72+
return null;
73+
}
7074
if (collectionConfig?.slug === 'posts') {
7175
return `posts/${data.slug}?locale=${locale.code}`;
7276
}

0 commit comments

Comments
 (0)