courrier multi account restore compose
This commit is contained in:
parent
5fb4e623db
commit
8967b27f17
@ -82,22 +82,18 @@ export default function EmailPanel({
|
||||
// If content is already an object with html/text, use it directly
|
||||
if (email.content && typeof email.content === 'object') {
|
||||
console.log('EmailPanel: Using existing content object');
|
||||
return {
|
||||
...email,
|
||||
content: email.content.html || email.content.text || '',
|
||||
html: email.content.html || email.html || '',
|
||||
text: email.content.text || email.text || ''
|
||||
};
|
||||
return email;
|
||||
}
|
||||
|
||||
// If content is a string, format it
|
||||
// If content is a string, convert it to object format
|
||||
if (typeof email.content === 'string') {
|
||||
console.log('EmailPanel: Using direct string content');
|
||||
console.log('EmailPanel: Converting string content to object');
|
||||
return {
|
||||
...email,
|
||||
content: email.content,
|
||||
html: email.html || email.content,
|
||||
text: email.text || email.content
|
||||
content: {
|
||||
text: email.text || email.content,
|
||||
html: email.html || email.content
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@ -105,9 +101,10 @@ export default function EmailPanel({
|
||||
console.log('EmailPanel: Using html/text properties');
|
||||
return {
|
||||
...email,
|
||||
content: email.html || email.text || '',
|
||||
html: email.html || '',
|
||||
text: email.text || ''
|
||||
content: {
|
||||
text: email.text || '',
|
||||
html: email.html || ''
|
||||
}
|
||||
};
|
||||
}, [email]);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user