composing email with attachments fails on Android (fix provided)
还没有人认领这个 Issue。
评估
- 难度
- 1/5
- 预计耗时
- 1 小时以内
- 新手友好度
- 50/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 停滞
- 技术栈
- android, javascript
- 领域
- mobile
调研方向
打开 index.android.js,并将其附件处理方式与 index.ios.js 中的 for-of 循环进行比较。验证请求的迭代更改,并在 Android 上测试使用附件数组撰写电子邮件;完成的标准是附件不再触发报告的 indexOf 错误。
由索引模型根据 Issue 内容生成。
描述
@nativescript/Email v2.0.5
Error
Calling email.compose with array 'attachments' fails with this error:
JS: 'Error in email.compose: TypeError: Cannot read property 'indexOf' of undefined'
Problem
The problem is that 'compose' in "index.android.js" parses attachments using a "for-in" loop. My array created via brackets in JS has a 'move' method by default, and so this for-in loop parses 'attachments[move]' which fails.
Fix
The fix is simply to change it to a "for-of" loop, as is the case in "index.ios.js".
Replace this...
for (const a in arg.attachments) {
const attachment = arg.attachments[a];
with this...
for (const attachment of arg.attachments) {
- 主要语言
- TypeScript
- 星标
- 206
- 派生
- 123
- 平均合并
- 2 天 1 小时
- 30 天内合并 PR
- 1
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
NativeScript/plugins 的其他 Issue
-
难度 1/5 1 小时以内 新手友好度 92/100
NativeScript/plugins#680 ·
-
难度 2/5 1-3 小时 新手友好度 82/100
NativeScript/plugins#671 ·
-
难度 1/5 1 小时以内 新手友好度 72/100
NativeScript/plugins#640 ·
-
难度 4/5 3-5 天 新手友好度 45/100
NativeScript/plugins#668 ·
-
难度 4/5 3-5 天 新手友好度 45/100
NativeScript/plugins#665 · 1 条评论 ·
查看 NativeScript/plugins 的全部 Issue
相似的 Issue
-
comp/dashboard P3 type/bug
难度 2/5 1-3 小时 新手友好度 86/100
NousResearch/hermes-agent#117722 ·
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
难度 2/5 1-3 小时 新手友好度 78/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
难度 1/5 1 小时以内 新手友好度 76/100
-
code-quality refactoring
难度 2/5 1-3 小时 新手友好度 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
难度 2/5 1-3 小时 新手友好度 74/100
langchain-ai/deepagents#6450 ·