Skip to content

Commit 59e2db9

Browse files
committed
fix missing ship skin name
1 parent 73cc48a commit 59e2db9

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/ships/gallery.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,12 @@ export async function fetchGallery(
107107
(node) => {
108108
let tab = <HTMLElement>node;
109109

110-
const skinName = normalizeName(tab.title);
110+
const skinName = normalizeName(tab.getAttribute("data-title"));
111111
let skinCategory;
112-
try{
112+
try {
113113
skinCategory = handleSkinCategory({ name, skinName, skinsPage });
114-
}catch(e){
115-
console.log(e)
114+
} catch (e) {
115+
console.log(e);
116116
}
117117
let image;
118118
if (tab.querySelector(".tabber__panel"))
@@ -213,7 +213,9 @@ export async function fetchGallery(
213213
)
214214
).forEach((box) =>
215215
gallery.push({
216-
description: box.querySelector(".shipart-caption, .shipgirl-art-caption, .shipgirl-caption").textContent.trim(),
216+
description: box
217+
.querySelector(".shipart-caption, .shipgirl-art-caption, .shipgirl-caption")
218+
.textContent.trim(),
217219
url: galleryThumbnailUrlToActualUrl(box.getElementsByTagName("img")[0].src),
218220
})
219221
);

0 commit comments

Comments
 (0)