Also check that path is defined

This commit is contained in:
Kyle Mathews 2015-12-01 11:08:12 -08:00
parent f6d5fef8c3
commit 3052f6ecfa

View file

@ -21,7 +21,7 @@ export default class extends React.Component {
for (i = 0, len = ref.length; i < len; i++) {
page = ref[i];
title = ((ref1 = page.data) != null ? ref1.title : void 0) || page.path;
if (page.path !== "/" && !((ref2 = page.data) != null ? ref2.draft : void 0)) {
if (page.path && page.path !== "/" && !((ref2 = page.data) != null ? ref2.draft : void 0)) {
pageLinks.push(
<li
key={page.path}
@ -59,6 +59,6 @@ export default class extends React.Component {
</ul>
</div>
</DocumentTitle>
);
)
}
}