Commit 9abf5af
Jesse Allen
Handling one or zero items with circular
Having one item with circular set to true resulted in a single item
cloned and scrolling, which is not a desirable condition. Having
zero items with circular set to true resulted in an error. By
enforcing a check more similar to the one performed when circular
is false, we are able to catch this condition.
Additionally, the prev and next buttons are set to disabled in the
case of one or zero items.1 parent d65b237 commit 9abf5af
1 file changed
+10
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
195 | 199 | | |
196 | | - | |
| 200 | + | |
197 | 201 | | |
198 | 202 | | |
199 | 203 | | |
| |||
225 | 229 | | |
226 | 230 | | |
227 | 231 | | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
| 232 | + | |
| 233 | + | |
235 | 234 | | |
236 | 235 | | |
237 | 236 | | |
| |||
245 | 244 | | |
246 | 245 | | |
247 | 246 | | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
248 | 250 | | |
249 | 251 | | |
250 | 252 | | |
| |||
0 commit comments