Fix shift-click in bulk for first in list
| @@ -395,7 +395,7 @@ class BulkEditOverlay { | |||
| 395 | 395 | ||
| 396 | /** | 396 | /** |
| 397 | * @typedef {object} LastSelected - An object noting the last selected character and its state. | 397 | * @typedef {object} LastSelected - An object noting the last selected character and its state. |
| 398 | * @property {string} [characterId] - The character id of the last selected character. | 398 | * @property {number} [characterId] - The character id of the last selected character. |
| 399 | * @property {boolean} [select] - The selected state of the last selected character. <c>true</c> if it was selected, <c>false</c> if it was deselected. | 399 | * @property {boolean} [select] - The selected state of the last selected character. <c>true</c> if it was selected, <c>false</c> if it was deselected. |
| 400 | */ | 400 | */ |
| 401 | 401 | ||
| @@ -675,7 +675,7 @@ class BulkEditOverlay { | |||
| 675 | const characterId = Number(currentCharacter.getAttribute('data-chid')); | 675 | const characterId = Number(currentCharacter.getAttribute('data-chid')); |
| 676 | const select = !this.selectedCharacters.includes(characterId); | 676 | const select = !this.selectedCharacters.includes(characterId); |
| 677 | 677 | ||
| 678 | if (this.lastSelected.characterId && this.lastSelected.select !== undefined) { | 678 | if (this.lastSelected.characterId >= 0 && this.lastSelected.select !== undefined) { |
| 679 | // Only if select state and the last select state match we execute the range select | 679 | // Only if select state and the last select state match we execute the range select |
| 680 | if (select === this.lastSelected.select) { | 680 | if (select === this.lastSelected.select) { |
| 681 | this.toggleCharactersInRange(currentCharacter, select); | 681 | this.toggleCharactersInRange(currentCharacter, select); |