From 848e3bcc34425e0d784bc63c4eaa8a7d160eab0f Mon Sep 17 00:00:00 2001 From: Prssanna Desai Date: Fri, 16 Aug 2019 13:40:11 +0530 Subject: [PATCH] fix: use arrow function --- frappe/desk/page/user_profile/user_profile.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frappe/desk/page/user_profile/user_profile.js b/frappe/desk/page/user_profile/user_profile.js index 270d454cde..222fe03bac 100644 --- a/frappe/desk/page/user_profile/user_profile.js +++ b/frappe/desk/page/user_profile/user_profile.js @@ -62,9 +62,8 @@ class UserProfile { } setup_user_search() { - var me = this; - this.$user_search_button = this.page.set_secondary_action('Change User', function() { - me.show_user_search_dialog(); + this.$user_search_button = this.page.set_secondary_action('Change User', () => { + this.show_user_search_dialog(); }); } @@ -82,7 +81,8 @@ class UserProfile { primary_action_label: __('Go'), primary_action: ({ user }) => { dialog.hide(); - this.check_user_exists(user); + this.user_id = user; + this.make_user_profile(); } }); dialog.show();