I got the following error when I created a layout without a header.
Uncaught TypeError: Cannot read properties of null (reading 'addEventListener')
at main.min.js:1:2293
at Array.forEach (<anonymous>)
at HTMLDocument.<anonymous> (main.min.js:1:2271)
Uncaught TypeError: Cannot set properties of null (setting 'innerHTML')
at setMode (main.min.js:1:1492)
at window.onload (main.min.js:1:1803)
so added null checks to ensure that we use these elements when it actually exists.
I got the following error when I created a layout without a header.
so added null checks to ensure that we use these elements when it actually exists.