Skip to content

Commit dea2515

Browse files
authored
Исправляет ошибку чтения координат значка (#1326)
1 parent 8f48254 commit dea2515

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/scripts/modules/person-badges.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,11 @@ function arrangeBadges(badges) {
238238
}
239239

240240
function arrangeShapes(badges, coords) {
241+
if (!badges.length) return
242+
if (!coords) return
243+
241244
badges.forEach((b, i) => {
245+
if (!coords[i]) return
242246
b.parentElement.style = `--start-col: ${coords[i].x + 1}; --start-row: ${coords[i].y + 1};`
243247
})
244248
}

0 commit comments

Comments
 (0)