Nested RG returns empty `Current Cell Index` in html element

I have a nested Repeating Group and there I placed html element in it.
In the html element, I have a script that adds new id attributes.
Screen Shot 2022-10-20 at 9.41.00

The script runs ok, but I have a minor issues visible on DevTools.

It says the “Current Cell Index” is not there when the code runs.
Is there any way to avoid this alert coming up on DevTools?
I have tried setTimeout() and async await, but the issue still remains.

This means that the variable entry<value><index#> doesn’t exist.
The values this could take could be ‘entry1231’ for example, where 123 is the value and 1 is the Index. So the JS evaluator is looking for a variable called ‘entry1231’ and can’t find it most likely because it’s not defined.

I’d also make sure there isn’t a mistaken space anywhere in there.
Looks like more of a JS thing than anything.

Not sure if this is happening for a specific value of Current Cell’s Index

Thanks for the comment, @atomicfusion .

Yes, I am aware of that, thanks. Let me also clarify again that the code I presented above does work fine. But I see errors pops up on my console. I just want to remove those errors for peace of my mind.

If I look into the error on my console, it says the “Current Cell Index” is not there when the html has run.
Screen Shot 2022-10-22 at 11.43.20
I think the reason is because the HTML element in the repeating group is deeply nested so that fails to catch the Current Cell Index .

Did anybody find a way to avoid the dynamic value returns null data?
Checking the Wait to render this element until it is visible causes another problems, so this is not good.