Title: Checking &#8220;Optimize HTML Code?&#8221; now throws error
Last modified: October 3, 2019

---

# Checking “Optimize HTML Code?” now throws error

 *  Resolved [sadiqodunsi](https://wordpress.org/support/users/sadiqodunsi/)
 * (@sadiqodunsi)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/checking-optimize-html-code-now-throws-error/)
 * Hi,
 * After the last update of Astra theme, checking “Optimize HTML Code?” now throws
   the below error:
 *     ```
       Uncaught TypeError: Cannot read property 'classList' of null
           at AstraToggleSetup (autoptimize_2d8cebe44c79723972dc921c8ecfe9b0.js:20)
           at HTMLDocument.<anonymous> (autoptimize_2d8cebe44c79723972dc921c8ecfe9b0.js:20)
       ```
   
 * It works perfectly before the update. Kindly look into this.
 * Best regards,
    Sadiq

Viewing 1 replies (of 1 total)

 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/checking-optimize-html-code-now-throws-error/#post-11994018)
 * Afraid I can’t guarantee out-the-box compatibility with all plugins & themes 
   and I don’t do test to ensure this, even not with the great theme Astra is. Best
   way forwards would be to do some troubleshooting as explained in [the AO FAQ](https://wordpress.org/plugins/autoptimize/#faq).
   The easiest solution will probably be to add `wp-content/themes/astra` to the
   comma-separated JS optimization exclusion list.
 * hope this helps,
    frank

Viewing 1 replies (of 1 total)

The topic ‘Checking “Optimize HTML Code?” now throws error’ is closed to new replies.

 * ![](https://ps.w.org/autoptimize/assets/icon-256X256.png?rev=2211608)
 * [Autoptimize](https://wordpress.org/plugins/autoptimize/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/autoptimize/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/autoptimize/)
 * [Active Topics](https://wordpress.org/support/plugin/autoptimize/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/autoptimize/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/autoptimize/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * Last activity: [6 years, 7 months ago](https://wordpress.org/support/topic/checking-optimize-html-code-now-throws-error/#post-11994018)
 * Status: resolved