refactor(element-parsing): handle elements with integer ids closes #500
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user