From 6e2b9a1a05031c47065bc442348cf5f2de7734ec Mon Sep 17 00:00:00 2001 From: Nobuyuki Fujioka Date: Fri, 16 Mar 2018 11:53:01 +0000 Subject: [PATCH] fix for nested sortables with react-sortablejs Could you add this conditional so that I can use nested sortables with react-sortablejs? https://github.com/cheton/react-sortable/issues/23 --- Sortable.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Sortable.js b/Sortable.js index 8b32dfb..36b4dee 100644 --- a/Sortable.js +++ b/Sortable.js @@ -1338,7 +1338,9 @@ evt.originalEvent = originalEvt; - rootEl.dispatchEvent(evt); + if(rootEl) { + rootEl.dispatchEvent(evt); + } if (options[onName]) { options[onName].call(sortable, evt);