Skip to content

Commit 1551753

Browse files
address pr feedback
1 parent 30b90d5 commit 1551753

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/editor/components/timetable/TimetableGrid.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ export default class TimetableGrid extends Component<Props> {
197197
case 222: { // single quote
198198
// Set current cell's value to adjacent cell's (leftward) value.
199199
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)) {
201201
const value = objectPath.get(data[scrollToRow], adjacentCol.key)
202202
this._handleCellChange(value, scrollToRow, col, scrollToColumn)
203203
this.offsetScrollCol(1)
@@ -208,7 +208,7 @@ export default class TimetableGrid extends Component<Props> {
208208
case 76: { // l
209209
// Set current cell's value to adjacent cell's (rightward) value.
210210
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)) {
212212
const value = objectPath.get(data[scrollToRow], adjacentCol.key)
213213
this._handleCellChange(value, scrollToRow, col, scrollToColumn)
214214
this.offsetScrollCol(-1)

0 commit comments

Comments
 (0)