ignore missing matches records in widget
[sc2-widget] / widget.html
index 363f70ae24c6c7a35d3ba9ad631d092b005f8ab9..ccc9e78af0b2fbef82fbc963cac13fe736b1536b 100644 (file)
@@ -58,7 +58,7 @@
                        `).join('')}
                        </ul>
                        <ul class=matches>
-                       ${clan.matches.splice(0, 3).map(match => `
+                       ${(clan.matches || []).splice(0, 3).map(match => `
                                <li data-members="${match.players}" class=${match.decision.toLowerCase()}>
                                        ${matchtime(new Date(match.date * 1000))} ${match.type}
                                </li>