server: Fix divide by 0

if loopNodes returns no nodes, return a NODATA instead of crashing.