From 18fbb3f9080f5b0e6ce0c3a4eff1c4064b64be8a Mon Sep 17 00:00:00 2001 From: unlishema Date: Thu, 18 Sep 2025 12:41:02 -0400 Subject: [PATCH] Fixed a couple bugs in the CORS test --- dist/dev.html | 5 +++-- dist/pages/data/version.json | 2 +- src/dev.html | 5 +++-- src/pages/data/version.json | 2 +- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/dist/dev.html b/dist/dev.html index 821f53e..7078c07 100644 --- a/dist/dev.html +++ b/dist/dev.html @@ -218,7 +218,7 @@ for (const key of keys) option.value += `'${key}',`; option.value = option.value.slice(0, -1); // Remove trailing comma - option.value += `).where('${keys[0]}', '${item[keys[0]]}').run()`; + option.value += `).where('${keys[0]}', '${item[keys[0]].replaceAll("'", "\\'")}').run()`; option.textContent = keys ? item[keys[0]] : "No KEYS"; document.getElementById("itemSelect").appendChild(option); @@ -226,7 +226,8 @@ if (i > 0) continue; // Only display the first item by default for (const key of keys) - extractedDataElement.innerHTML += `

${key}: ${item[key] || 'N/A'}

`; + extractedDataElement.innerHTML += `

${key}: ${!(key in item) ? 'false' : (item[key] === '' ? 'true' : item[key])}

`; + } rawDataElement.innerHTML = `
${JSON.stringify(itemData, null, 2)}
`; diff --git a/dist/pages/data/version.json b/dist/pages/data/version.json index ef08071..1529d43 100644 --- a/dist/pages/data/version.json +++ b/dist/pages/data/version.json @@ -1,3 +1,3 @@ { - "version": "0.0.32" + "version": "0.0.33" } \ No newline at end of file diff --git a/src/dev.html b/src/dev.html index 821f53e..7078c07 100644 --- a/src/dev.html +++ b/src/dev.html @@ -218,7 +218,7 @@ for (const key of keys) option.value += `'${key}',`; option.value = option.value.slice(0, -1); // Remove trailing comma - option.value += `).where('${keys[0]}', '${item[keys[0]]}').run()`; + option.value += `).where('${keys[0]}', '${item[keys[0]].replaceAll("'", "\\'")}').run()`; option.textContent = keys ? item[keys[0]] : "No KEYS"; document.getElementById("itemSelect").appendChild(option); @@ -226,7 +226,8 @@ if (i > 0) continue; // Only display the first item by default for (const key of keys) - extractedDataElement.innerHTML += `

${key}: ${item[key] || 'N/A'}

`; + extractedDataElement.innerHTML += `

${key}: ${!(key in item) ? 'false' : (item[key] === '' ? 'true' : item[key])}

`; + } rawDataElement.innerHTML = `
${JSON.stringify(itemData, null, 2)}
`; diff --git a/src/pages/data/version.json b/src/pages/data/version.json index ef08071..1529d43 100644 --- a/src/pages/data/version.json +++ b/src/pages/data/version.json @@ -1,3 +1,3 @@ { - "version": "0.0.32" + "version": "0.0.33" } \ No newline at end of file -- 2.43.0