2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-18 04:55:44 +00:00

let vs var

This commit is contained in:
Oliver Walters
2023-02-21 20:57:41 +11:00
parent bf5c366b5d
commit 12c8c64414
2 changed files with 4 additions and 4 deletions

View File

@ -1686,16 +1686,16 @@ function addSecondaryModal(field, fields, options) {
// Callback function when the secondary button is pressed
$(options.modal).find(`#btn-new-${field_name}`).click(function() {
var secondary = field.secondary;
let secondary = field.secondary;
// Determine the API query URL
var url = secondary.api_url || field.api_url;
let url = secondary.api_url || field.api_url;
// If the "fields" attribute is a function, call it with data
if (secondary.fields instanceof Function || secondary.fieldsFunction instanceof Function) {
// Extract form values at time of button press
var data = extractFormData(fields, options);
let data = extractFormData(fields, options);
// Backup and execute fields function in sequential executions of modal
if (secondary.fields instanceof Function) {

View File

@ -758,7 +758,7 @@ function createPurchaseOrderLineItem(order, options={}) {
/* Construct a set of fields for the SalesOrderLineItem form */
function soLineItemFields(options={}) {
var fields = {
let fields = {
order: {
hidden: true,
},