fix: Duplicate name columns in list_view when no title field defined (#14006)

* fix duplicate name columns in list_view when no title field defined

* refactor: Simplify code

Co-authored-by: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com>
This commit is contained in:
Steve 2021-08-25 06:09:29 -04:00 committed by GitHub
parent d8a264e1d2
commit 586835a833
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -367,6 +367,7 @@ frappe.views.ListView = class ListView extends frappe.views.BaseList {
if (
!this.settings.hide_name_column &&
this.meta.title_field &&
this.meta.title_field !== 'name'
) {
this.columns.push({