Skip to content

Commit

Permalink
Fix an error when there's no hotspots
Browse files Browse the repository at this point in the history
  • Loading branch information
phalkunz committed Sep 30, 2018
1 parent eb409bc commit dd30f45
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions code/traits/ProccessMapDataTrait.php
Expand Up @@ -27,8 +27,10 @@ public function getImageMapViewableData()
$data = json_decode($this->ProcessMapData, true);
$arrayList = ArrayList::create();

foreach ($data as $value) {
$arrayList->push(Area::create($value));
if (is_array($data)) {
foreach ($data as $value) {
$arrayList->push(Area::create($value));
}
}

$arrayData = ArrayData::create([
Expand Down

0 comments on commit dd30f45

Please sign in to comment.