gluon-status-page: fix address_to_groups()

In js `return` does behave like `continue` in a forEach() iteration.
The fixed function was intended to return nothing on error and does so
now, instead of a shorter (useless) array like before.
This commit is contained in:
aiyion.prime 2021-10-25 15:25:15 +02:00
parent 7b2ab5e6c6
commit 8c85be2125
2 changed files with 4 additions and 3 deletions

File diff suppressed because one or more lines are too long

View File

@ -553,7 +553,8 @@
var n = parts.length;
var groups = [];
parts.forEach(function(part, i) {
for (var i = 0; i < parts.length; i++) {
var part = parts[i];
if (part === '') {
while (n++ <= 8)
groups.push(0);
@ -563,7 +564,7 @@
groups.push(parseInt(part, 16));
}
});
};
return groups;
}