Title: Code improvement / Uncaught TypeError: globalControl is undefined
Last modified: August 25, 2022

---

# Code improvement / Uncaught TypeError: globalControl is undefined

 *  Resolved [maxivillus](https://wordpress.org/support/users/maxivillus/)
 * (@maxivillus)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/code-improvement-uncaught-typeerror-globalcontrol-is-undefined/)
 * I would like to suggest a code improvement in the file `assets/js/editor-modules.
   js` in the function `isGlobalControl: function isGlobalControl(control, controls)`
   on line 1128.
 * If you add a variable check `if (!globalControl) return false;` after the line`
   var globalControl = controls[controlGlobalKey];` then errors can be avoided:
 *     ```
       Uncaught TypeError: globalControl is undefined
           isGlobalControl https://site.com/wp-content/plugins/elementor/assets/js/editor-modules.js?ver=3.7.2:1145
           getStyleControls https://site.com/wp-content/plugins/elementor/assets/js/editor-modules.js?ver=3.7.2:1122
           each jQuery
           getStyleControls https://site.com/wp-content/plugins/elementor/assets/js/editor-modules.js?ver=3.7.2:1107
           getStyleControls https://site.com/wp-content/plugins/elementor/assets/js/editor-modules.js?ver=3.7.2:1117
           N Underscore
           e Backbone
       editor-modules.js:1145:9
       ```
   
    -  This topic was modified 3 years, 9 months ago by [maxivillus](https://wordpress.org/support/users/maxivillus/).
    -  This topic was modified 3 years, 9 months ago by [maxivillus](https://wordpress.org/support/users/maxivillus/).
    -  This topic was modified 3 years, 9 months ago by [maxivillus](https://wordpress.org/support/users/maxivillus/).
    -  This topic was modified 3 years, 9 months ago by [Jan Dembowski](https://wordpress.org/support/users/jdembowski/).

Viewing 1 replies (of 1 total)

 *  [Elementor Team](https://wordpress.org/support/users/michellei/)
 * (@michellei)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/code-improvement-uncaught-typeerror-globalcontrol-is-undefined/#post-15956546)
 * Hi, since this is a development-based query, may opt to visit our Github account
   where you may get in contact with a member of our development team to query this.
   
   Please note that this is not an official support channel but a respective member
   of the development team will respond to your post as soon as they are available.
   Please follow this guide which outlines the steps required to post on our Github:
   [https://github.com/elementor/elementor/blob/master/.github/CONTRIBUTING.md](https://github.com/elementor/elementor/blob/master/.github/CONTRIBUTING.md)

Viewing 1 replies (of 1 total)

The topic ‘Code improvement / Uncaught TypeError: globalControl is undefined’ is
closed to new replies.

 * ![](https://ps.w.org/elementor/assets/icon-256x256.gif?rev=3444228)
 * [Elementor Website Builder - more than just a page builder](https://wordpress.org/plugins/elementor/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/elementor/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/elementor/)
 * [Active Topics](https://wordpress.org/support/plugin/elementor/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/elementor/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/elementor/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Elementor Team](https://wordpress.org/support/users/michellei/)
 * Last activity: [3 years, 9 months ago](https://wordpress.org/support/topic/code-improvement-uncaught-typeerror-globalcontrol-is-undefined/#post-15956546)
 * Status: resolved