Commit 53ae99eb authored by Janis Streib's avatar Janis Streib 🦉

FIX: null error on empty subnets if there are multiple subnets (closes #256)

parent 241d7160
Pipeline #131153 passed with stages
in 4 minutes and 39 seconds
......@@ -761,6 +761,7 @@ export default {
continue
}
let last = ipaddress.ip_to_int(subnet.cidr.split('/')[0])
const min = last
const hard_maximum = ipaddress.ip_to_int(ipaddress.ip_net_get_last(subnet.cidr))
let cur = null
while (working_arecs.length > 0) {
......@@ -822,6 +823,9 @@ export default {
last = cur
}
if (cur !== hard_maximum) {
if (cur === null) {
cur = min
}
// The last fucking block
const blk = {
lower: ipaddress.int_to_ip(cur),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment