fix: fallback content to render before save to prevent null trim error

pull/7973/head
Gabriel Mowses (Mouse) 3 months ago
parent 1d6c63f170
commit b034f5d191

@ -537,6 +537,15 @@ export const usePageStore = defineStore('page', {
async pageSave () {
const editorStore = useEditorStore()
const siteStore = useSiteStore()
// Ensure content is not null before saving
if (!this.content && this.render) {
this.content = this.render
}
if (!this.content) {
this.content = '<p></p>'
}
try {
if (editorStore.mode === 'create') {
const resp = await APOLLO_CLIENT.mutate({

Loading…
Cancel
Save