Skip to content
Snippets Groups Projects
Verified Commit e36f81ea authored by Daniel Hornung's avatar Daniel Hornung
Browse files

MAINT: var -> const

parent d132f157
Branches
Tags
2 merge requests!131FIX: error in regexp to match URLs,!130F fix max dropdown options
Pipeline #47320 passed
This commit is part of merge request !130. Comments created here will be created in the context of that merge request.
...@@ -1893,16 +1893,16 @@ var edit_mode = new function () { ...@@ -1893,16 +1893,16 @@ var edit_mode = new function () {
* which can be referenced by the property. * which can be referenced by the property.
*/ */
this.retrieve_datatype_list = async function (datatype) { this.retrieve_datatype_list = async function (datatype) {
var find_entity = ["FILE", "REFERENCE"].includes(datatype) ? "" : `"${datatype}"`; const find_entity = ["FILE", "REFERENCE"].includes(datatype) ? "" : `"${datatype}"`;
const max_options = parseInt("${BUILD_MAX_EDIT_MODE_DROPDOWN_OPTIONS}"); //for each query; there might be more candidates in total const max_options = parseInt("${BUILD_MAX_EDIT_MODE_DROPDOWN_OPTIONS}"); //for each query; there might be more candidates in total
var query_suffix = max_options != -1 ? `&P=0L${max_options}` : ""; const query_suffix = max_options != -1 ? `&P=0L${max_options}` : "";
if (max_options != -1) { if (max_options != -1) {
var n_entities = datatype !== "FILE" ? await edit_mode.query(`COUNT Record ${find_entity}`, true) : 0; var n_entities = datatype !== "FILE" ? await edit_mode.query(`COUNT Record ${find_entity}`, true) : 0;
var n_files = await edit_mode.query(`COUNT File ${find_entity}`, true); var n_files = await edit_mode.query(`COUNT File ${find_entity}`, true);
} }
var entities = datatype !== "FILE" ? edit_mode.query(`FIND Record ${find_entity}${query_suffix}`, true) : []; const entities = datatype !== "FILE" ? edit_mode.query(`FIND Record ${find_entity}${query_suffix}`, true) : [];
var files = edit_mode.query(`FIND File ${find_entity}${query_suffix}`, true); const files = edit_mode.query(`FIND File ${find_entity}${query_suffix}`, true);
await Promise.all([entities, files]) await Promise.all([entities, files])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment