Skip to content

Commit

Permalink
fix SortableJS#140 empty context
Browse files Browse the repository at this point in the history
  • Loading branch information
danielsussa committed Feb 6, 2023
1 parent 8687d34 commit 7eaf7dc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/core/componentStructure.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
const getHtmlElementFromNode = ({ el }) => el;
const getHtmlElementFromNode = (node) => {
const el =
node.el || (Array.isArray(node.children) && node.children[0].el.parentNode);
return el || {};
};

const addContext = (domElement, context) =>
(domElement.__draggable_context = context);
const getContext = domElement => domElement.__draggable_context;
Expand Down

0 comments on commit 7eaf7dc

Please sign in to comment.