Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a bug that the confirmation dialog for a new mail doesn't work #43

Merged
merged 1 commit into from
Jan 28, 2025

Conversation

HashidaTKS
Copy link
Contributor

On a new mail, data.originalRecipients.to is undefined, and data.originalRecipients.to.map(...) raises an invalid member access error. We need to check if to is undefined or not.
You need to check cc and bcc as well.

  • Confirm that the confirmation dialog for new mail work fine.
  • Confirm that the warning for newly added domains are worked fine.

On a new mail, `data.originalRecipients.to` is `undefined`, and
`data.originalRecipients.to.map(...)` raises an invalid member access error.
We need to check if `to` is `undefined` or not.
You need to check `cc` and `bcc` as well.
@HashidaTKS HashidaTKS requested a review from piroor January 21, 2025 08:32
@piroor
Copy link
Member

piroor commented Jan 28, 2025

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Optional_chaining
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Nullish_coalescing
These operatiors require Chrome/Edge 80 and later which was released at 2020. Windows 10 LTSB released at 2016 is still alive until 2026, so such very old environments need to be dropped with this change. Anyway such versions are not recommended to use with public Internet, thus it looks reasonable to drop them.

@piroor piroor merged commit ac1fbeb into main Jan 28, 2025
1 check passed
@HashidaTKS
Copy link
Contributor Author

HashidaTKS commented Jan 28, 2025

https://babeljs.io/docs/babel-plugin-transform-nullish-coalescing-operator

This plugin is included in @babel/preset-env, in ES2020

Our babel.config.json:

{
  "presets": ["@babel/preset-env"]
}

So I think webpacked(compiled) source codes are transpilied to not use .? and ??.
Actually, webpacked(compiled) confirm.js does not contain .? and ??.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants