pemedia / payload-visual-editor

Payload CMS plugin which provides a visual live editor directly in the Admin UI. Works for collections and globals. Compatible with any kind of JS/TS based frontend technology.
MIT License
208 stars 10 forks source link

fix: required but undefined richtexts lexical check #36

Closed jpeiniger closed 9 months ago

jpeiniger commented 9 months ago

Got an error and therefor no preview, when a slate richText field was conditional but not active and also required. In this case, the lexical check in generateDocument.ts threw an exception, because the editor.editorConfig property does not exist in this case. This PR should hopefully fix this.