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
+2 -2
View File
@@ -11,7 +11,7 @@ const useElementUpdater = (propElements: Elements): void => {
useEffect(() => {
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) {
const data = !isEqual(existingElement.data, propElement.data)
@@ -41,7 +41,7 @@ const useElementUpdater = (propElements: Elements): void => {
if (typeof propElement.isHidden !== 'undefined') {
elementProps.isHidden = propElement.isHidden;
}
if (typeof propElement.type !== 'undefined') {
elementProps.type = propElement.type;
}