Skip to content

Commit 0b52d14

Browse files
committed
fix: NodeList.forEach is undefined in certain browsers
1 parent 92f4c26 commit 0b52d14

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/SortableContainer/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ export default function sortableContainer(WrappedComponent, config = {withRef: f
215215

216216
const fields = node.querySelectorAll('input, textarea, select');
217217
const clonedNode = node.cloneNode(true);
218-
const clonedFields = clonedNode.querySelectorAll('input, textarea, select'); // Returns the clonedFields in the same order as fields
218+
const clonedFields = [...clonedNode.querySelectorAll('input, textarea, select')]; // Convert NodeList to Array
219219

220220
clonedFields.forEach((field, index) => {
221221
return field.value = fields[index] && fields[index].value;

0 commit comments

Comments
 (0)