1
0
mirror of https://github.com/axllent/mailpit.git synced 2024-12-30 23:17:59 +02:00

Fix: Prevent JavaScript error if message is missing From header (#209)

This commit is contained in:
Ralph Slooten 2023-11-19 09:10:27 +13:00
parent ef41de06ae
commit d013158ac3
3 changed files with 4 additions and 3 deletions

View File

@ -293,7 +293,8 @@ export default {
</span>
</td>
</tr>
<tr v-if="message.ReturnPath && message.ReturnPath != message.From.Address" class="small">
<tr v-if="message.ReturnPath && message.From && message.ReturnPath != message.From.Address"
class="small">
<th class="text-nowrap">Return-Path</th>
<td class="privacy text-body-secondary text-break">
&lt;<a :href="searchURI(message.ReturnPath)" class="text-body-secondary">

View File

@ -89,7 +89,7 @@ export default {
<label class="col-sm-2 col-form-label text-body-secondary">From</label>
<div class="col-sm-10">
<input type="text" aria-label="From address" readonly class="form-control-plaintext"
:value="message.From.Address">
:value="message.From ? message.From.Address : ''">
</div>
</div>
<div class="row">

View File

@ -341,6 +341,6 @@ export default {
<AboutMailpit modals />
<AjaxLoader :loading="loading" />
<Release v-if="message" ref="ReleaseRef" :message="message" @delete="deleteMessage" />
<Release v-if="mailbox.uiConfig.MessageRelay && message" ref="ReleaseRef" :message="message" @delete="deleteMessage" />
<Screenshot v-if="message" ref="ScreenshotRef" :message="message" />
</template>