Skip to content

Commit 107bf34

Browse files
committed
Skip incomplete avatars when laying out images
1 parent 3019b5e commit 107bf34

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/update-svgs.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -129,13 +129,13 @@ function layoutItems(items, data, y) {
129129
const rowItems = []
130130
let w = 0
131131
while (i < items.length) {
132-
const item = items[i]
132+
const item = items[i++]
133133
const image = item.image
134+
if (!image) continue
134135
const newW = w + image.width + (w > 0 ? margin(image.height) : 0)
135136
if (newW >= WIDTH - 20) break // leave a little space around
136137
rowItems.push(item)
137138
w = newW
138-
++i
139139
}
140140
x = (WIDTH - w) >>> 1
141141
row(rowItems)

0 commit comments

Comments
 (0)