Unified · Split
| @@ -1,21 +1,9 @@ | ||
| 1 | −// TODO: This file was created by bulk-decaffeinate. | |
| 2 | −// Sanity-check the conversion and remove this comment. | |
| 3 | −/* | |
| 4 | − * decaffeinate suggestions: | |
| 5 | − * DS101: Remove unnecessary use of Array.from | |
| 6 | − * DS102: Remove unnecessary code created because of implicit returns | |
| 7 | − * DS205: Consider reworking code to avoid use of IIFEs | |
| 8 | − * DS207: Consider shorter variations of null checks | |
| 9 | − * Full docs: https://github.com/decaffeinate/decaffeinate/blob/main/docs/suggestions.md | |
| 10 | − */ | |
| 11 | 1 | app.templates.aboutPage = function () { |
| 12 | 2 | let doc; |
| 13 | − const all_docs = app.docs | |
| 14 | − .all() | |
| 15 | − .concat(...Array.from(app.disabledDocs.all() || [])); | |
| 3 | + const all_docs = app.docs.all().concat(...(app.disabledDocs.all() || [])); | |
| 16 | 4 | // de-duplicate docs by doc.name |
| 17 | 5 | const docs = []; |
| 18 | − for (doc of Array.from(all_docs)) { | |
| 6 | + for (doc of all_docs) { | |
| 19 | 7 | if (!docs.find((d) => d.name === doc.name)) { |
| 20 | 8 | docs.push(doc); |
| 21 | 9 | } |
| @@ -85,23 +73,12 @@ app.templates.aboutPage = function () { · 63 unmodified lines | ||
| 85 | 73 | <th>Documentation |
| 86 | 74 | <th>Copyright/License |
| 87 | 75 | <th>Source code |
| 88 | − ${(() => { | |
| 89 | − const result = []; | |
| 90 | − | |
| 91 | − for (doc of Array.from(docs)) { | |
| 92 | − result.push(`<tr> \ | |
| 93 | −<td><a href=\"${doc.links != null ? doc.links.home : undefined}\">${ | |
| 94 | − doc.name | |
| 95 | − }</a></td> \ | |
| 96 | −<td>${doc.attribution}</td> \ | |
| 97 | −<td><a href=\"${ | |
| 98 | − doc.links != null ? doc.links.code : undefined | |
| 99 | − }\">Source code</a></td> \ | |
| 100 | −</tr>`); | |
| 101 | − } | |
| 102 | − | |
| 103 | − return result; | |
| 104 | − })().join("")} | |
| 76 | + ${docs | |
| 77 | + .map( | |
| 78 | + (doc) => | |
| 79 | + `<tr><td><a href="${doc.links?.home}">${doc.name}</a></td><td>${doc.attribution}</td><td><a href="${doc.links?.code}">Source code</a></td></tr>`, | |
| 80 | + ) | |
| 81 | + .join("")} | |
| 105 | 82 | </table> |
| 106 | 83 | </div> |
| 107 | 84 | |