diff --git a/assets/script.js b/assets/script.js index d13382d..ba00dea 100644 --- a/assets/script.js +++ b/assets/script.js @@ -635,7 +635,8 @@ async function getMemeImages() { fileList.forEach((item) => { let option = document.createElement("option"); option.value = item.ID; - option.text = `${item.Path.split("/")[-1]} - (${item.ID}) [${item.UploadedBy}]`; + let splitPath = item.Path.split("/"); + option.text = `${splitPath[splitPath.length - 1]} - (${item.ID}) [${item.UploadedBy}]`; memeImageSelector.appendChild(option); });