Skip to content

Commit 83c5385

Browse files
committed
fix: review
1 parent 6db29c3 commit 83c5385

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/StructuredYson/StructuredYson.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,8 +291,7 @@ export class StructuredYson extends React.PureComponent<Props, State> {
291291
}
292292

293293
// Calculate next index in total matches
294-
let nextTotalIndex = matchIndex + diff;
295-
nextTotalIndex = ((nextTotalIndex % totalMatches) + totalMatches) % totalMatches;
294+
const nextTotalIndex = (totalMatches + matchIndex + diff) % totalMatches;
296295

297296
const targetMatchPath = allMatchPaths[nextTotalIndex];
298297

0 commit comments

Comments
 (0)