refactor(element-parsing): handle elements with integer ids closes #500

This commit is contained in:
moklick
2020-09-11 10:54:04 +02:00
parent 121952bba7
commit 1425b8ffde
+1 -1
View File
@@ -11,7 +11,7 @@ const useElementUpdater = (propElements: Elements): void => {
useEffect(() => { useEffect(() => {
const nextElements: Elements = propElements.map((propElement) => { const nextElements: Elements = propElements.map((propElement) => {
const existingElement = stateElements.find((el) => el.id === propElement.id); const existingElement = stateElements.find((el) => el.id === propElement.id?.toString());
if (existingElement) { if (existingElement) {
const data = !isEqual(existingElement.data, propElement.data) const data = !isEqual(existingElement.data, propElement.data)