Skip to content

Commit 11163f5

Browse files
committed
Fix problem in journeys map when no images exist yet
1 parent e7d1951 commit 11163f5

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/main/handlebars/journeys.handlebars

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,13 @@
3636
3737
{{#each journeys}}
3838
{{#each locations}}
39-
{{#with (wrap images @index)}}
40-
mapping.mark('/journey/{{slug}}', {{lon}}, {{lat}}, `{{title}}: {{../name}}`, '/image/{{slug}}/thumb-{{name}}.webp');
41-
{{/with}}
39+
mapping.mark('/journey/{{slug}}', {{lon}}, {{lat}}, `{{title}}: {{name}}`,
40+
{{#with (wrap images @index)}}
41+
'/image/{{slug}}/thumb-{{name}}.webp'
42+
{{else}}
43+
'/image/{{preview.slug}}/thumb-{{preview.name}}.webp'
44+
{{/with}}
45+
);
4246
{{/each}}
4347
{{/each}}
4448

0 commit comments

Comments
 (0)