Skip to content

Commit c08d0db

Browse files
Fix issue with usepace when a track has multiple categories
1 parent 3b9623f commit c08d0db

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

components/com_jtg/views/track/tmpl/default.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,8 @@
155155
<?php
156156
echo $this->mapJS;
157157
$sortedcats = JtgModeljtg::getCatsData(true);
158-
$usepace = $this->track->catid? $sortedcats[$this->track->catid]->usepace: 0;
158+
$catids = explode(',',$this->track->catid);
159+
$usepace = is_numeric($catids[0])? $sortedcats[$catids[0]]->usepace: 0;
159160
$graphJS = JtgMapHelper::parseGraphJS($this->gpsTrack, $this->cfg, $this->params, $usepace);
160161
if (!empty($graphJS))
161162
{

0 commit comments

Comments
 (0)