Cannot use in operator to search for innerHTML in null TypeError: Cannot use in operator to search for innerHTML in null

0
Hi team,  I get this random error whenever i click on a few buttons, and i dont understand the exact reason why i am getting this, can someone please help? Thanks
asked
2 answers
0

You are using widget Datacounter which is causing this error. Try to update it, solve its bug or report it to the maker.

Hm, but DataCounter is not in Mendix's AppStore. Did you create it yourself? And you did state this somewhere:

'innerHTML' in somevariable

whilst somevariable is null, not initialised. That will give you the error you mention.

answered
0

As Tim mentioned, this error occurs in DataCounter widget. 

This error means: You use innerHTML to retrieve the text from a input field or something. 

And in the widget you are trying find something using ‘in’ operator with the value returned using innerHTML.

But the value returned in null or empty. So javascript is complaining that value returned using innerHTML is null and you are using ‘in’ operator again the null value.

Try to optimize the Datacounter widget with validation checks for the value returned using innerHTML

answered