Skip to content

Commit

Permalink
Fix reference error
Browse files Browse the repository at this point in the history
This fixes an error in the Frontend Utility (see #e2ca807c) where a null reference is produced
because  doesn't exist anymore.
  • Loading branch information
Marcus Hellmann committed May 19, 2022
1 parent bd400de commit 148662b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Classes/Utility/FrontendUtility.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,6 @@ public static function addQueryInformationAsJavaScript($query, array $settings,
*/
public static function getIndexes($underlyingQueryInfo)
{
return ['positionIndex' => $underlyingQueryInfo['position'] - 1, 'previousIndex' => max([$index['positionIndex'] - 1, 0]), 'nextIndex' => $index['positionIndex'] + 1, 'resultIndexOffset' => (0 === $index['positionIndex']) ? 0 : 1];
return ['positionIndex' => $underlyingQueryInfo['position'] - 1, 'previousIndex' => max([$underlyingQueryInfo['position'] - 2, 0]), 'nextIndex' => $underlyingQueryInfo['position'], 'resultIndexOffset' => (0 === $underlyingQueryInfo['position'] - 1) ? 0 : 1];
}
}

0 comments on commit 148662b

Please sign in to comment.