135003b02fd3d3cd21400ea5b1bb58a385892efb
chmalee
  Tue Jan 14 15:46:05 2025 -0800
Change for..in loop to for..of, refs #35018

diff --git src/hg/js/hgMyData.js src/hg/js/hgMyData.js
index 8430288..2cc84fc 100644
--- src/hg/js/hgMyData.js
+++ src/hg/js/hgMyData.js
@@ -115,32 +115,31 @@
         "hic": [".hic"],
         "cram": [".cram"],
         "bigBarChart": [".bigbarchart"],
         "bigGenePred": [".bgp", ".biggenepred"],
         "bigMaf": [".bigmaf"],
         "bigInteract": [".biginteract"],
         "bigPsl": [".bigpsl"],
         "bigChain": [".bigchain"],
         "bamIndex": [".bam.bai", ".bai"],
         "tabixIndex": [".vcf.gz.tbi", "vcf.bgz.tbi"],
     };
 
     function detectFileType(fileName) {
         let fileLower = fileName.toLowerCase();
         for (let fileType in extensionMap) {
-            for (let extIx in extensionMap[fileType]) {
-                let ext = extensionMap[fileType][extIx];
+            for (let ext of extensionMap[fileType]) {
                 if (fileLower.endsWith(ext)) {
                     return fileType;
                 }
             }
         }
         //we could alert here but instead just explicitly set the value to null
         //and let the backend reject it instead, forcing the user to rename their
         //file
         //alert(`file extension for ${fileName} not found, please explicitly select it`);
         return null;
     }
 
     function defaultDb() {
         return cartDb.split(" ").slice(-1)[0];
     }