File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -412,6 +412,7 @@ class NoteList extends React.Component {
412
412
let { selectedNoteKeys } = this . state
413
413
const { ctrlKeyDown, shiftKeyDown } = this . state
414
414
let firstShiftSelectedNoteIndex = - 1
415
+ const hasSelectedNoteKey = selectedNoteKeys . length > 0
415
416
416
417
if ( ctrlKeyDown && selectedNoteKeys . includes ( uniqueKey ) ) {
417
418
const newSelectedNoteKeys = selectedNoteKeys . filter ( ( noteKey ) => noteKey !== uniqueKey )
@@ -425,7 +426,7 @@ class NoteList extends React.Component {
425
426
}
426
427
selectedNoteKeys . push ( uniqueKey )
427
428
428
- if ( shiftKeyDown && selectedNoteKeys . length > 0 ) {
429
+ if ( shiftKeyDown && hasSelectedNoteKey ) {
429
430
const firstSelectedNoteIndex =
430
431
Math . max ( this . getNoteIndexByKey ( selectedNoteKeys [ 0 ] ) ,
431
432
this . state . firstShiftSelectedNoteIndex )
You can’t perform that action at this time.
0 commit comments