Skip to content

fix(notebooks): fix bug in notebooks generator#543

Merged
xaoxuu merged 1 commit intoxaoxuu:mainfrom
calfzhou:feature/fix-notebooks-generator
Nov 19, 2024
Merged

fix(notebooks): fix bug in notebooks generator#543
xaoxuu merged 1 commit intoxaoxuu:mainfrom
calfzhou:feature/fix-notebooks-generator

Conversation

@calfzhou
Copy link
Contributor

notebooks.tree is an object, not array.

修复在 notebooks generator 中,之前对 notebooks.tree 是否为空的错误判定。

最初版本 notebooks.tree.length === 0 会导致没有 notebook 的时候,拦不住。

后一个版本 notebooks.tree.length === undefined 会导致有 notebooks 的时候也直接返回。

因为 notebooks.tree 是对象而不是数组,取 length 始终返回 undefined

@bolt-new-by-stackblitz
Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@xaoxuu xaoxuu merged commit beb5f3d into xaoxuu:main Nov 19, 2024
@calfzhou calfzhou deleted the feature/fix-notebooks-generator branch December 2, 2024 14:19
lliei0x pushed a commit to lliei0x-x/hexo-theme-stellar that referenced this pull request Aug 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants