From 1f2e0d4ef63e31338e1ba27861917f9761deaf86 Mon Sep 17 00:00:00 2001 From: Vasile Date: Thu, 22 Jun 2023 10:56:18 +0300 Subject: [PATCH] Fix cannot read properties of null ref --- lib/DragSortableView.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/DragSortableView.js b/lib/DragSortableView.js index 6170f82..1eb0b56 100644 --- a/lib/DragSortableView.js +++ b/lib/DragSortableView.js @@ -177,7 +177,7 @@ export default class DragSortableView extends Component{ let left = this.touchCurItem.originLeft + dx let top = this.touchCurItem.originTop + dy - this.touchCurItem.ref.setNativeProps({ + this.touchCurItem.ref?.setNativeProps({ style: { zIndex: touchZIndex, } @@ -271,7 +271,7 @@ export default class DragSortableView extends Component{ useNativeDriver: false, } ).start(()=>{ - this.touchCurItem.ref.setNativeProps({ + this.touchCurItem.ref?.setNativeProps({ style: { zIndex: defaultZIndex, }