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:
parent
7b2ab5e6c6
commit
8c85be2125
File diff suppressed because one or more lines are too long
@ -553,7 +553,8 @@
|
|||||||
var n = parts.length;
|
var n = parts.length;
|
||||||
var groups = [];
|
var groups = [];
|
||||||
|
|
||||||
parts.forEach(function(part, i) {
|
for (var i = 0; i < parts.length; i++) {
|
||||||
|
var part = parts[i];
|
||||||
if (part === '') {
|
if (part === '') {
|
||||||
while (n++ <= 8)
|
while (n++ <= 8)
|
||||||
groups.push(0);
|
groups.push(0);
|
||||||
@ -563,7 +564,7 @@
|
|||||||
|
|
||||||
groups.push(parseInt(part, 16));
|
groups.push(parseInt(part, 16));
|
||||||
}
|
}
|
||||||
});
|
};
|
||||||
|
|
||||||
return groups;
|
return groups;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user