• Resolved sadikr

    (@sadikr)


    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 3 years, 6 months ago by sadikr.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Script error’ is closed to new replies.