Listview formatter

I am using doctype_list.js file to customize my Listview display. In this file, I am using formatter function to return value for particular field as calculated field. Say, field email is used but value is returned as name of the user.

e.g.

formatters: {

    email(val) {

       

        let obj = userlist.find(o => o.email === val);

        if (obj)

            return obj.name;

        else

            return val;

    }

}

userlist is having {email, name} list. In my local frappe setup this works fine. But on live it does not. It gives me email only instead of name. I printed value on console too. It gets the new value but not returning the same in listview.

Local Version: Frappe Framework: v12.0.2 (version-12)
Live version: Frappe Framework: v12.9.1 (version-12)