Properly check cluster points label (#323)

This commit is contained in:
Marcin Michalski 2018-10-29 20:04:06 +01:00 committed by Arkadiusz Kondas
parent 53c5a6b9e5
commit f2dd40cb6f

View File

@ -31,7 +31,7 @@ class Cluster extends Point implements IteratorAggregate
{
$points = [];
foreach ($this->points as $point) {
if (count($point->label) === 0) {
if ($point->label === null) {
$points[] = $point->toArray();
} else {
$points[$point->label] = $point->toArray();