Dynamic grid JS errors

I created a dynamic grid without pojo’s to store components inside, looks like it working but got JS errors:
Exception is thrown during JavaScript execution. Stacktrace will be dumped separately.
The error has occurred in the JS code: ‘$0, return (function() { var disableEvent = function () {if($0.getAttribute(‘disableOnClick’)){ $0.setAttribute(‘disabled’, ‘true’);}};$0.addEventListener(‘click’, disableEvent)}).apply($0)’
Uncaught TypeError: Cannot read properties of null (reading ‘addEventListener’)
anyone maybe experienced something like this?

That snippet comes from a Button if that helps you to identify the culprit