fix: use replace instead of slice

Co-Authored-By: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com>
This commit is contained in:
Prssanna Desai 2020-01-15 14:31:45 +05:30 committed by GitHub
parent 2004e2e4cf
commit 09548a881b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -83,7 +83,7 @@ frappe.ui.GroupBy = class {
apply_settings(settings) {
// Extract fieldname from `tabdoctype`.`fieldname`
let group_by_fieldname = settings.group_by.split('.')[1].slice(1, -1);
let group_by_fieldname = settings.group_by.split('.')[1].replace('`', '');
this.groupby_select.val(group_by_fieldname);
this.aggregate_function_select.val(settings.aggregate_function);