Skip to content

Commit 07c135d

Browse files
committed
Fix variant increment overflow.
1 parent 0e040ab commit 07c135d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

OpenMapSamplesControl.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ export default class SampleControl {
387387
}
388388

389389
incrementVariant(sample) {
390-
if (this._variantSelect.selectedIndex < this._variantSelect.options.length) {
390+
if (this._variantSelect.selectedIndex < this._variantSelect.options.length - 1) {
391391
this._variantSelect.selectedIndex = this._variantSelect.selectedIndex + 1;
392392
this.changeVariant(sample);
393393
}

0 commit comments

Comments
 (0)