[Notebook] Fixing pages with no entries breaking search (#3791)

* also added result count to search results
This commit is contained in:
Jamie V 2021-04-06 17:17:38 -07:00 committed by GitHub
parent cf2b8b3c8a
commit 46f7f6dd04
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -430,7 +430,7 @@ export default {
}
// check for no entries first
if (entries[section.id]) {
if (entries[section.id] && entries[section.id][page.id]) {
const pageEntries = entries[section.id][page.id];
pageEntries.forEach(entry => {

View File

@ -22,7 +22,7 @@
<template>
<div class="c-notebook__search-results">
<div class="c-notebook__search-results__header">Search Results</div>
<div class="c-notebook__search-results__header">Search Results ({{ results.length }})</div>
<div class="c-notebook__entries">
<NotebookEntry v-for="(result, index) in results"
:key="index"