Title: Script error
Last modified: October 19, 2020

---

# Script error

 *  Resolved [sadikr](https://wordpress.org/support/users/sadikr/)
 * (@sadikr)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/script-error-29/)
 * Hi there,
 * With the latest update (1.9.14), I do see a script error in the console and the
   side effect of that every click on ‘Save’ is popping up alert box for ‘Leave 
   Site – Changes you made may not be saved.’
 * Per the initial investigation, it seems the following function is failing.
 *     ```
       wpcf7cf.transformConditionsFromArrayOfObjectsToString = function(conditions) {
           return conditions.map(function(condition){
               var indent = ' '.repeat(condition.then_field.length + 4);
               return <code>show [${condition.then_field}]</code>+condition.and_rules.map(function(rule, i){
                   return ( i>0 ? indent+'and ':'' ) + <code>if [${rule.if_field}] ${rule.operator} &quot;${rule.if_value}&quot;</code>
               }).join('\n');
           }).join('\n');
       }
       ```
   
 * The root cause is `condition.then_field` remains `null` in some of the case and
   which throws an error. is there anyone who is facing the same issue?
 * Thanks!
    -  This topic was modified 5 years, 6 months ago by [sadikr](https://wordpress.org/support/users/sadikr/).

Viewing 1 replies (of 1 total)

 *  Plugin Author [Jules Colle](https://wordpress.org/support/users/jules-colle/)
 * (@jules-colle)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/script-error-29/#post-13567840)
 * Is this happening in all browsers and with all your forms?
 * Can you share a link to the page?

Viewing 1 replies (of 1 total)

The topic ‘Script error’ is closed to new replies.

 * ![](https://ps.w.org/cf7-conditional-fields/assets/icon-256x256.png?rev=2072595)
 * [Conditional Fields for Contact Form 7](https://wordpress.org/plugins/cf7-conditional-fields/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/cf7-conditional-fields/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/cf7-conditional-fields/)
 * [Active Topics](https://wordpress.org/support/plugin/cf7-conditional-fields/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/cf7-conditional-fields/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/cf7-conditional-fields/reviews/)

## Tags

 * [script error](https://wordpress.org/support/topic-tag/script-error/)

 * 1 reply
 * 2 participants
 * Last reply from: [Jules Colle](https://wordpress.org/support/users/jules-colle/)
 * Last activity: [5 years, 6 months ago](https://wordpress.org/support/topic/script-error-29/#post-13567840)
 * Status: resolved