picocms / Pico

Pico is a stupidly simple, blazing fast, flat file CMS.
http://picocms.org/
MIT License
3.81k stars 616 forks source link

Uncaught TypeError: Cannot read property 'offsetWidth' of null #559

Closed qualityshepherd closed 3 years ago

qualityshepherd commented 3 years ago

I'm getting the following error on my site: https://brine.dev . Nothing in the logs and I can't quite figure out why it's happening. I'm on v2.1.3

utils.js:133 Uncaught TypeError: Cannot read property 'offsetWidth' of null
    at Object.utils.isElementVisible (utils.js:133)
    at onResizeEvent (pico.js:54)
    at main (pico.js:67)
    at pico.js:70
stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in two days if no further activity occurs. Thank you for your contributions! :+1:

PhrozenByte commented 3 years ago

This is a error in your custom theme. Remove

<script src="https://brine.dev/themes/brine/js/modernizr-3.3.1-custom.min.js" type="text/javascript"></script>
<script src="https://brine.dev/themes/brine/js/utils.js" type="text/javascript"></script>
<script src="https://brine.dev/themes/brine/js/pico.js" type="text/javascript"></script>

from your theme.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in two days if no further activity occurs. Thank you for your contributions! :+1: