Fix sidebar bug
Validate if the description is available in the rawSearchIndex
This commit is contained in:
parent
8943653624
commit
48aea41adb
|
@ -713,10 +713,12 @@
|
||||||
if (crates[i] == window.currentCrate) {
|
if (crates[i] == window.currentCrate) {
|
||||||
klass += ' current';
|
klass += ' current';
|
||||||
}
|
}
|
||||||
var desc = rawSearchIndex[crates[i]].items[0][3];
|
if (rawSearchIndex[crates[i]].items[0]) {
|
||||||
div.append($('<a>', {'href': '../' + crates[i] + '/index.html',
|
var desc = rawSearchIndex[crates[i]].items[0][3];
|
||||||
'title': plainSummaryLine(desc),
|
div.append($('<a>', {'href': '../' + crates[i] + '/index.html',
|
||||||
'class': klass}).text(crates[i]));
|
'title': plainSummaryLine(desc),
|
||||||
|
'class': klass}).text(crates[i]));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
sidebar.append(div);
|
sidebar.append(div);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue