mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-15 05:41:51 +00:00
cases: don't break if a case note is an empty string
This commit is contained in:
parent
ae97a5dded
commit
0a4b4147c6
1 changed files with 6 additions and 1 deletions
|
@ -52,7 +52,12 @@ export async function getCaseEmbed(
|
|||
if (theCase.notes.length) {
|
||||
theCase.notes.forEach((note: any) => {
|
||||
const noteDate = moment(note.created_at);
|
||||
const chunks = chunkMessageLines(note.body, 1014);
|
||||
let noteBody = note.body.trim();
|
||||
if (noteBody === "") {
|
||||
noteBody = emptyEmbedValue;
|
||||
}
|
||||
|
||||
const chunks = chunkMessageLines(noteBody, 1014);
|
||||
|
||||
for (let i = 0; i < chunks.length; i++) {
|
||||
if (i === 0) {
|
||||
|
|
Loading…
Add table
Reference in a new issue