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.
Uncaught TypeError: Cannot read properties of null (reading 'style') at HTMLDocument. (app.js:1:1279)
Issue location:
https://github.com/dotkernel/frontend/blob/5.0/src/App/assets/js/components/_avatar.js#L45
let captionInput = document.querySelector('.kv-fileinput-caption');
captionInput.style.height = '86px';
captionInput.style.marginTop = '33px';
Solution:
Check if the object captionInput is not null before trying to access it on the following lines.
Issue:
The code looks for the HTML element
.kv-fileinput-captionand 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
captionInputis not null before trying to access it on the following lines.