diff --git a/src/helpers/functions/textureComparison.ts b/src/helpers/functions/textureComparison.ts index 4e076ef2..9fe444d2 100644 --- a/src/helpers/functions/textureComparison.ts +++ b/src/helpers/functions/textureComparison.ts @@ -51,7 +51,7 @@ export default async function textureComparison( ).data; const displayed = parseDisplay(display); - const defaultURL = result.urls.find((url) => url[0] == "default")?.[1]; + const defaultURL = Object.fromEntries(result.urls).default; const dimension = await loadImage(defaultURL); if (dimension.width * dimension.height * displayed.flat().length > 262144) return null; @@ -62,7 +62,7 @@ export default async function textureComparison( // had problems with nested async mapping so this is easier for everyone loadedImages.push([]); for (const pack of packSet) { - const image = result.urls.find((url) => url[0] == pack)?.[1]; + const image = Object.fromEntries(result.urls)[pack]; if (!image) continue; try { loadedImages.at(-1).push(await loadImage(image)); diff --git a/src/interfaces/firestorm.ts b/src/interfaces/firestorm.ts index ba1f9081..616c4dcb 100644 --- a/src/interfaces/firestorm.ts +++ b/src/interfaces/firestorm.ts @@ -58,5 +58,5 @@ export interface Texture extends BaseTexture { export interface GalleryTexture extends Omit { // texture properties are moved into their own object texture: BaseTexture; - urls: [string, string]; + urls: [string, string][]; }