mirror of
https://github.com/dreamhunter2333/cloudflare_temp_email.git
synced 2026-05-19 18:39:31 +08:00
fix: ensure emailForwardingList is always initialized (#799)
- Fix emailRuleSettings initialization to ensure emailForwardingList is always an array - Prevent SyntaxError when adding new forwarding rules with incomplete backend data - Use optional chaining to safely access emailRuleSettings fields 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -255,9 +255,9 @@ const fetchData = async () => {
|
||||
verifiedAddressList.value = res.verifiedAddressList || []
|
||||
fromBlockList.value = res.fromBlockList || []
|
||||
noLimitSendAddressList.value = res.noLimitSendAddressList || []
|
||||
emailRuleSettings.value = res.emailRuleSettings || {
|
||||
blockReceiveUnknowAddressEmail: false,
|
||||
emailForwardingList: []
|
||||
emailRuleSettings.value = {
|
||||
blockReceiveUnknowAddressEmail: res.emailRuleSettings?.blockReceiveUnknowAddressEmail || false,
|
||||
emailForwardingList: res.emailRuleSettings?.emailForwardingList || []
|
||||
}
|
||||
} catch (error) {
|
||||
message.error(error.message || "error");
|
||||
|
||||
Reference in New Issue
Block a user