fix(notebooks): fix bug in notebooks generator - `notebooks.tree` is an object, not array (#543)
This commit is contained in:
parent
48ab63cc2d
commit
beb5f3d348
|
@ -30,7 +30,7 @@ function paginationWithEmpty(base, posts, options={}) {
|
|||
|
||||
hexo.extend.generator.register('notebooks', function (locals) {
|
||||
const { site_tree, notebooks } = hexo.theme.config
|
||||
if (notebooks.tree.length === undefined) {
|
||||
if (!notebooks?.tree || Object.keys(notebooks.tree).length === 0) {
|
||||
return []
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue