payload-plugin-newsletter 0.16.7 → 0.16.9

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.
@@ -914,6 +914,9 @@ var EMAIL_SAFE_CONFIG = {
914
914
  FORBID_ATTR: ["class", "id", "onclick", "onload", "onerror"]
915
915
  };
916
916
  async function convertToEmailSafeHtml(editorState, options) {
917
+ if (!editorState) {
918
+ return "";
919
+ }
917
920
  const rawHtml = await lexicalToEmailHtml(editorState, options?.mediaUrl);
918
921
  const sanitizedHtml = DOMPurify.sanitize(rawHtml, EMAIL_SAFE_CONFIG);
919
922
  if (options?.wrapInTemplate) {