From 40ce3726f8cfc1e375989c51760558fcd3c8d53c Mon Sep 17 00:00:00 2001 From: "guohui.deng" Date: Thu, 30 May 2019 17:35:53 +0800 Subject: [PATCH] fix rowsLayouts[key] is undefined trigger height is undefined crash --- src/SortableList.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SortableList.js b/src/SortableList.js index 3d3ff9f..df0b083 100644 --- a/src/SortableList.js +++ b/src/SortableList.js @@ -242,7 +242,7 @@ export default class SortableList extends Component { const style = {[ZINDEX]: 0}; const location = {x: 0, y: 0}; - if (rowsLayouts) { + if (rowsLayouts && rowsLayouts[key]) { if (horizontal) { location.x = nextX; nextX += rowsLayouts[key] ? rowsLayouts[key].width : 0;