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.
@@ -965,6 +965,9 @@ var EMAIL_SAFE_CONFIG = {
965
965
  FORBID_ATTR: ["class", "id", "onclick", "onload", "onerror"]
966
966
  };
967
967
  async function convertToEmailSafeHtml(editorState, options) {
968
+ if (!editorState) {
969
+ return "";
970
+ }
968
971
  const rawHtml = await lexicalToEmailHtml(editorState, options?.mediaUrl);
969
972
  const sanitizedHtml = import_isomorphic_dompurify.default.sanitize(rawHtml, EMAIL_SAFE_CONFIG);
970
973
  if (options?.wrapInTemplate) {