File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
lib/editor/components/timetable Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -197,7 +197,7 @@ export default class TimetableGrid extends Component<Props> {
197
197
case 222 : { // single quote
198
198
// Set current cell's value to adjacent cell's (leftward) value.
199
199
const adjacentCol = columns [ this . _getColIndex ( scrollToColumn ) - 1 ]
200
- if ( evt . shiftKey && ! activeCell && isTimeFormat ( adjacentCol . type ) ) {
200
+ if ( evt . shiftKey && ! activeCell && adjacentCol && isTimeFormat ( adjacentCol . type ) && isTimeFormat ( col . type ) ) {
201
201
const value = objectPath . get ( data [ scrollToRow ] , adjacentCol . key )
202
202
this . _handleCellChange ( value , scrollToRow , col , scrollToColumn )
203
203
this . offsetScrollCol ( 1 )
@@ -208,7 +208,7 @@ export default class TimetableGrid extends Component<Props> {
208
208
case 76 : { // l
209
209
// Set current cell's value to adjacent cell's (rightward) value.
210
210
const adjacentCol = columns [ this . _getColIndex ( scrollToColumn ) + 1 ]
211
- if ( evt . shiftKey && ! activeCell && isTimeFormat ( adjacentCol . type ) ) {
211
+ if ( evt . shiftKey && ! activeCell && adjacentCol && isTimeFormat ( adjacentCol . type ) && isTimeFormat ( col . type ) ) {
212
212
const value = objectPath . get ( data [ scrollToRow ] , adjacentCol . key )
213
213
this . _handleCellChange ( value , scrollToRow , col , scrollToColumn )
214
214
this . offsetScrollCol ( - 1 )
You can’t perform that action at this time.
0 commit comments