Skip to content

Commit

Permalink
fix: Appropriate variable name, avoid redefining parameter
Browse files Browse the repository at this point in the history
(cherry picked from commit 9851999)
  • Loading branch information
marination authored and mergify[bot] committed May 27, 2024
1 parent 8db7fcd commit 83cf2df
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions frappe/public/js/frappe/form/grid.js
Original file line number Diff line number Diff line change
Expand Up @@ -826,9 +826,10 @@ export default class Grid {
acc[d.fieldname] = d.default;
return acc;
}, {});
let idx = this.df.data.length + 1;
this.df.data.push({ idx: idx, __islocal: true, ...defaults });
this.df.on_add_row && this.df.on_add_row(idx);

const row_idx = this.df.data.length + 1;
this.df.data.push({ idx: row_idx, __islocal: true, ...defaults });
this.df.on_add_row && this.df.on_add_row(row_idx);
this.refresh();
}

Expand Down

0 comments on commit 83cf2df

Please sign in to comment.