ministryofjustice / justice-gov-uk

Justice UK website
https://www.justice.gov.uk/
MIT License
2 stars 0 forks source link

Fix error: Cannot read properties of null (reading 'classList') #197

Closed EarthlingDavey closed 5 months ago

EarthlingDavey commented 5 months ago

Uses body as the element to toggle a user preference variation class. Instead of .wp-block-post-content, which is not in the DOM for the code editor view.

Fixes: https://ministryofjustice.sentry.io/issues/5481194459/?environment=production&project=4506813195157504&query=is%3Aunresolved+issue.priority%3A%5Bhigh%2C+medium%5D&referrer=issue-stream&statsPeriod=24h&stream_index=4