Skip to content

Commit

Permalink
optimize header split logic
Browse files Browse the repository at this point in the history
  • Loading branch information
tinohager committed Jul 22, 2024
1 parent b6dfd42 commit c89bb7a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Frontend/src/helpers/mailHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,12 @@ function decodeMailHeader (mailHeader: string, headerIndex: number): HeaderDetai

const indexOfFirstColon = encodedMailHeader.indexOf(':')

const headerName = encodedMailHeader.slice(0, indexOfFirstColon).trim()
const headerData = encodedMailHeader.slice(indexOfFirstColon + 1).trim()

return {
headerName: encodedMailHeader.slice(0, indexOfFirstColon),
headerData: encodedMailHeader.slice(indexOfFirstColon + 2),
headerName,
headerData,
headerIndex
}
}
Expand Down

0 comments on commit c89bb7a

Please sign in to comment.