File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -22,15 +22,17 @@ defaults._set('radar', {
2222} ) ;
2323
2424function nextItem ( collection , index , loop ) {
25- return index >= collection . length - 1
26- ? loop ? collection [ 0 ] : collection [ index ]
27- : collection [ index + 1 ] ;
25+ if ( index >= collection . length - 1 ) {
26+ return loop ? collection [ 0 ] : collection [ index ] ;
27+ }
28+ return collection [ index + 1 ] ;
2829}
2930
3031function previousItem ( collection , index , loop ) {
31- return index <= 0
32- ? loop ? collection [ collection . length - 1 ] : collection [ index ]
33- : collection [ index - 1 ] ;
32+ if ( index <= 0 ) {
33+ return loop ? collection [ collection . length - 1 ] : collection [ index ] ;
34+ }
35+ return collection [ index - 1 ] ;
3436}
3537
3638module . exports = DatasetController . extend ( {
You can’t perform that action at this time.
0 commit comments