diff --git a/Aggregation/Ipv4RangeAggregation.php b/Aggregation/Ipv4RangeAggregation.php
index 32d29cdd5caccc694bc15de7525e72ac2396f9e1..b8ac5bdddc82137b7133e30a284b41ea5f216771 100644
--- a/Aggregation/Ipv4RangeAggregation.php
+++ b/Aggregation/Ipv4RangeAggregation.php
@@ -74,7 +74,7 @@ class Ipv4RangeAggregation extends AbstractAggregation
      */
     public function getArray()
     {
-        if ($this->getField() && $this->ranges) {
+        if ($this->getField() && !empty($this->ranges)) {
             return [
                 'field' => $this->getField(),
                 'ranges' => array_values($this->ranges),