diff --git a/src/core/js/edit_mode.js b/src/core/js/edit_mode.js
index cb44eb3f05dd8d67688f4d46ff7a68039476e8f8..af4a6bbc3d8a2f1475193ac83bb25759b1b30be4 100644
--- a/src/core/js/edit_mode.js
+++ b/src/core/js/edit_mode.js
@@ -1893,10 +1893,10 @@ var edit_mode = new function () {
      *     which can be referenced by the property.
      */
     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
 
-        var query_suffix = max_options != -1 ? `&P=0L${max_options}` : "";
+        const query_suffix = max_options != -1 ? `&P=0L${max_options}` : "";
         if (max_options != -1) {
             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);