The code looks for the HTML element .kv-fileinput-caption and when it does not find it, the below error is shown in the console.
The error happens on all pages, except for /account/avatar where the element actually exists.
Uncaught TypeError: Cannot read properties of null (reading 'style') at HTMLDocument. (app.js:1:1279)
Issue:
The code looks for the HTML element
.kv-fileinput-caption
and when it does not find it, the below error is shown in the console. The error happens on all pages, except for /account/avatar where the element actually exists.Issue location:
https://github.com/dotkernel/frontend/blob/5.0/src/App/assets/js/components/_avatar.js#L45
Solution:
Check if the object
captionInput
is not null before trying to access it on the following lines.