# 如何在分类框中使用时引入最新主题

**URL:** https://meta.discourse.org/t/how-to-bring-in-latest-topics-when-using-category-boxes/105679
**Category:** Development
**Created:** [2019 年1 月 4 日 09:26 UTC](https://meta.discourse.org/t/how-to-bring-in-latest-topics-when-using-category-boxes/105679 "2019-01-04T09:26:54Z")
**Posts on this page:** 1
**Showing post:** 13

<div class="post-metadata">

### Author: ![awesomerobot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awesomerobot/32/142900_2.png) [@awesomerobot](https://meta.discourse.org/u/awesomerobot)
#### Post date: [2021 年9 月 11 日 00:42 UTC](https://meta.discourse.org/t/how-to-bring-in-latest-topics-when-using-category-boxes/105679/13 "2021-09-11T00:42:19Z")

</div>

是的，确实出错了！感谢您的反馈。我已修复了上文帖子中的代码。

我们为 JavaScript 启用了 [严格模式](https://meta.discourse.org/t/upcoming-core-changes-that-may-break-some-themes-components-april-12/186252)，这意味着 `categoryName = [];` 需要先声明。将该行改为 `let categoryName = [];` 即可解决问题。

---

_[View the full topic](https://meta.discourse.org/t/how-to-bring-in-latest-topics-when-using-category-boxes/105679)._
