This is an automated email from the ASF dual-hosted git repository.
humbedooh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git
The following commit(s) were added to refs/heads/master by this push:
new b7d0411 use modern iteration
b7d0411 is described below
commit b7d0411e1ba197f0509be40ec8aecf927c7a0561
Author: Daniel Gruno <[email protected]>
AuthorDate: Wed Nov 17 18:33:39 2021 +0100
use modern iteration
---
webui/js/source/construct-thread.js | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/webui/js/source/construct-thread.js
b/webui/js/source/construct-thread.js
index 1a1d8c2..dbc67a5 100644
--- a/webui/js/source/construct-thread.js
+++ b/webui/js/source/construct-thread.js
@@ -89,8 +89,8 @@ function construct_thread(thread, cid, nestlevel, included) {
email.inject(wrapper);
if (isArray(thread.children)) {
thread.children.sort((a, b) => a.epoch - b.epoch);
- for (var i = 0; i < thread.children.length; i++) {
- let reply = construct_thread(thread.children[i], cid, nestlevel,
included);
+ for (let child of thread.children) {
+ let reply = construct_thread(child, cid, nestlevel, included);
cid++;
if (reply) {
email.inject(reply);
@@ -171,4 +171,4 @@ function construct_single_thread(state, json) {
let thread = json.thread;
let email = construct_thread(thread);
div.inject(email);
-}
\ No newline at end of file
+}