Title: Small error in JavaScript file
Last modified: September 1, 2016

---

# Small error in JavaScript file

 *  [maryisdead](https://wordpress.org/support/users/mawe/)
 * (@mawe)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/small-error-in-javascript-file/)
 * In scripts.js, there’s a little error that is triggered in certain use cases.
   Right at the start you find this:
 *     ```
       'use strict';
   
       if (typeof _wpcf7 == 'undefined' || _wpcf7 === null) {
       	_wpcf7 = {};
       }
       ```
   
 * If `_wpcf7` is indeed undefined, the strict mode will throw an error that `_wpcf7`
   is undefined when trying to declare it. Simple fix: use `**var** _wpcf7 = {};`.
 * I haven’t check for other strict mode compatibility errors but it might be worth
   to run this through JSLint.
 * Cheers!
 * [https://wordpress.org/plugins/contact-form-7/](https://wordpress.org/plugins/contact-form-7/)

The topic ‘Small error in JavaScript file’ is closed to new replies.

 * ![](https://ps.w.org/contact-form-7/assets/icon.svg?rev=2339255)
 * [Contact Form 7](https://wordpress.org/plugins/contact-form-7/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/contact-form-7/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/contact-form-7/)
 * [Active Topics](https://wordpress.org/support/plugin/contact-form-7/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/contact-form-7/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/contact-form-7/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [maryisdead](https://wordpress.org/support/users/mawe/)
 * Last activity: [9 years, 9 months ago](https://wordpress.org/support/topic/small-error-in-javascript-file/)
 * Status: not resolved